(self, provider)
Transfer fields like self.name or self.owner or the provider object.
Transfer fields like self.name or self.owner or the provider object.
Transfer fields like self . name or self . owner or the provider object .
def copy_fields_to_provider(self, provider):
        """
        Transfer fields like self.name or self.owner or the provider object.
        """

        if self._field_spec is None:
            # this is for types like Set() that have unrestricted parameters
            for (k,v) in self.kwargs.items():
                setattr(provider, k, v)
        else:
            for (k, spec) in self._field_spec.fields.items():
                value = getattr(self, k)
                setattr(provider, k, value)
def copy_fields_to_provider ( self , provider ) : if self . _field_spec is None : # this is for types like Set() that have unrestricted parameters for ( k , v ) in self . kwargs . items ( ) : setattr ( provider , k , v ) else : for ( k , spec ) in self . _field_spec . fields . items ( ) : value = getattr ( self , k ) setattr ( provider , k , value )