#NEWLINE# def __getattr__( self , key ) : #NEWLINE# #INDENT# 'Get an attr by calling :meth:`dict.__getitem__`.\n\n        Like :meth:`__setattr__`, this method converts :exc:`KeyError` to \n        :exc:`AttributeError`.\n\n        Examples\n        --------\n\n        >>> s = Struct(a=10)\n        >>> s.a\n        10\n        >>> type(s.get)\n        <class \'builtin_function_or_method\'>\n        >>> try:\n        ...     s.b\n        ... except AttributeError:\n        ...     print("I don\'t have that key")\n        ...     \n        I don\'t have that key\n        ' #NEWLINE# try : #NEWLINE# #INDENT# result = self [ key ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# raise AttributeError ( self ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return result