parameters: (self, item)
docstring: Allow access of attributes via names.
docstring_summary: Allow access of attributes via names.
docstring_tokens: Allow access of attributes via names .
function: def __getattr__(self, item):
          """Allow access of attributes via names."""
          try:
              return self[item]
          except Exception as e:
              # Make sure pickling doesn't break
              #   *MORE INFO*: This conditional wouldn't be necessary if __getattr__ wasn't used. But
              #                since it is in use (no worries), we need to give the pickle.dump*
              #                methods what they expect back. They expect to either get a KeyError
              #                exception or a tuple of args to be passed to the __new__ method upon
              #                unpickling (i.e. pickle.load* methods).
              #   *NOTE*: if the __new__ method were to be implemented in this class, this may have
              #           to be removed or changed.
              if item == '__getnewargs__':
                  raise KeyError(item)
  
              if hasattr(self, 'raw') and item in self.raw:
                  return self.raw[item]
              else:
                  raise AttributeError("%r object has no attribute %r (%s)" % (self.__class__, item, e))
function_tokens: def __getattr__ ( self , item ) : try : return self [ item ] except Exception as e : # Make sure pickling doesn't break #   *MORE INFO*: This conditional wouldn't be necessary if __getattr__ wasn't used. But #                since it is in use (no worries), we need to give the pickle.dump* #                methods what they expect back. They expect to either get a KeyError #                exception or a tuple of args to be passed to the __new__ method upon #                unpickling (i.e. pickle.load* methods). #   *NOTE*: if the __new__ method were to be implemented in this class, this may have #           to be removed or changed. if item == '__getnewargs__' : raise KeyError ( item ) if hasattr ( self , 'raw' ) and item in self . raw : return self . raw [ item ] else : raise AttributeError ( "%r object has no attribute %r (%s)" % ( self . __class__ , item , e ) )