done.  thanks.


On Thu, Mar 20, 2014 at 10:25 AM, David Baumgold
<notifications@github.com>wrote:

> In common/lib/xmodule/xmodule/tabs.py:
>
> > +        except KeyError:
> > +            return default
> > +
> > +    def __getitem__(self, key):
> > +        """
> > +        This method allows callers to access CourseTab members with the d[key] syntax as is done with
> > +        Python dictionary objects.
> > +        """
> > +        if key == 'name':
> > +            return self.name
> > +        elif key == 'type':
> > +            return self.type
> > +        elif key == 'tab_id':
> > +            return self.tab_id
> > +        else:
> > +            raise KeyError()
>
> It would be nice if you included the key value in the message for the
> KeyError, so that code that catches this exception can determine what was
> requested
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/edx/edx-platform/pull/2910/files#r10796635>
> .
>



-- 

edX | nasthagiri@edx.org <andya@edx.org>

141 Portland Street, 9th floor

Cambridge, MA 02139
http://www.edx.org <http://www.edxonline.org/>

[image:
http://www.e-learn.nl/media/blogs/e-learn/edX_Logo_Col_RGB_FINAL.jpg?mtime=1336074566]