(self, name, value)
Sets the attribute value, if a :class:`Field` updates backing store.

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

        >>> json_data = {'aInt': 1,  'aFloat': 2.1}
        >>> obj = global_schema.TypeUsingPython(json_data)
        >>> obj.a_int, obj.a_float
        (1, 2.1)
        >>> obj.a_int = 123
        >>> obj.a_int, obj.a_float
        (123, 2.1)
        >>> json_data['aInt']
        123

        However that's valid for known :class:`Field` for the given
        :class:`ContainerType` subclasses:

        >>> obj.new_attr = 'some value'  # no field, no backing store updates
        >>> obj.new_attr
        'some value'
        >>> json_data['new_attr']
        Traceback (most recent call last):
          ...
        KeyError: 'new_attr'
        >>> json_data['newAttr']
        Traceback (most recent call last):
          ...
        KeyError: 'newAttr'
Sets the attribute value, if a :class:`Field` updates backing store.
Sets the attribute value if a : class : Field updates backing store .
def __setattr__(self, name, value):
        '''Sets the attribute value, if a :class:`Field` updates backing store.

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

        >>> json_data = {'aInt': 1,  'aFloat': 2.1}
        >>> obj = global_schema.TypeUsingPython(json_data)
        >>> obj.a_int, obj.a_float
        (1, 2.1)
        >>> obj.a_int = 123
        >>> obj.a_int, obj.a_float
        (123, 2.1)
        >>> json_data['aInt']
        123

        However that's valid for known :class:`Field` for the given
        :class:`ContainerType` subclasses:

        >>> obj.new_attr = 'some value'  # no field, no backing store updates
        >>> obj.new_attr
        'some value'
        >>> json_data['new_attr']
        Traceback (most recent call last):
          ...
        KeyError: 'new_attr'
        >>> json_data['newAttr']
        Traceback (most recent call last):
          ...
        KeyError: 'newAttr'

        '''
        object.__setattr__(self, name, value)
        if not hasattr(self, '__json_data__'):  # still populating
            return
        # apply changes to json backing store, if name is known
        field = self.__fields_cache__.get(name)
        if field is None:
            field = getattr(self.__class__, name, None)
            if field is None:
                return
            self.__fields_cache__[name] = field

        json_value = field.type.__to_json_value__(value)
        self.__json_data__[field.graphql_name] = json_value
def __setattr__ ( self , name , value ) : object . __setattr__ ( self , name , value ) if not hasattr ( self , '__json_data__' ) : # still populating return # apply changes to json backing store, if name is known field = self . __fields_cache__ . get ( name ) if field is None : field = getattr ( self . __class__ , name , None ) if field is None : return self . __fields_cache__ [ name ] = field json_value = field . type . __to_json_value__ ( value ) self . __json_data__ [ field . graphql_name ] = json_value