pymodeler/parameter.py
def _load(self, **kwargs):
        """Load kwargs key,value pairs into __dict__
        """
        defaults = dict([(d[0], d[1]) for d in self.defaults])
        # Require kwargs are in defaults
        for k in kwargs:
            if k not in defaults:
                msg = "Unrecognized attribute of %s: %s" % (
                    self.__class__.__name__, k)
                raise AttributeError(msg)
        defaults.update(kwargs)

        # This doesn't overwrite the properties
        self.__dict__.update(defaults)

        # This should now be set
        self.check_type(self.__dict__['default'])

        # This sets the underlying property values (i.e., __value__)
        self.set(**defaults)
def _load(self, **kwargs):
        """Load kwargs key,value pairs into __dict__
        """
        defaults = dict([(d[0], d[1]) for d in self.defaults])
        # Require kwargs are in defaults
        for k in kwargs:
            if k not in defaults:
                msg = "Unrecognized attribute of %s: %s" % (
                    self.__class__.__name__, k)
                raise AttributeError(msg)
        defaults.update(kwargs)

        # This doesn't overwrite the properties
        self.__dict__.update(defaults)

        # This should now be set
        self.check_type(self.__dict__['default'])

        # This sets the underlying property values (i.e., __value__)
        self.set(**defaults)
def _load ( self , * * kwargs ) : defaults = dict ( [ ( d [ 0 ] , d [ 1 ] ) for d in self . defaults ] ) # Require kwargs are in defaults for k in kwargs : if k not in defaults : msg = "Unrecognized attribute of %s: %s" % ( self . __class__ . __name__ , k ) raise AttributeError ( msg ) defaults . update ( kwargs ) # This doesn't overwrite the properties self . __dict__ . update ( defaults ) # This should now be set self . check_type ( self . __dict__ [ 'default' ] ) # This sets the underlying property values (i.e., __value__) self . set ( * * defaults )
Load kwargs key,value pairs into __dict__
Load kwargs key value pairs into __dict__