(self, name)
Get the field given its name.

        Considering ``TypeUsingPython``, previously declared in the
        module documentation:

        >>> global_schema.TypeUsingPython['a_int']
        aInt: Int

        >>> global_schema.TypeUsingPython['unknown_field']
        Traceback (most recent call last):
          ...
        KeyError: 'TypeUsingPython has no field unknown_field'
Get the field given its name.
Get the field given its name .
def __getitem__(self, name):
        '''Get the field given its name.

        Considering ``TypeUsingPython``, previously declared in the
        module documentation:

        >>> global_schema.TypeUsingPython['a_int']
        aInt: Int

        >>> global_schema.TypeUsingPython['unknown_field']
        Traceback (most recent call last):
          ...
        KeyError: 'TypeUsingPython has no field unknown_field'
        '''
        try:
            return getattr(self, name)
        except AttributeError as exc:
            raise KeyError('%s has no field %s' % (self, name)) from exc
def __getitem__ ( self , name ) : try : return getattr ( self , name ) except AttributeError as exc : raise KeyError ( '%s has no field %s' % ( self , name ) ) from exc