def __call__(cls, *args, **kwargs):
        """Here additional instance setup happens here before init is called

        This allows subclasses of :code:`HasProperties` to override
        the init method without worrying about breaking setup.
        """
        obj = cls.__new__(cls, *args, **kwargs)
        object.__setattr__(obj, '_backend', dict())
        object.__setattr__(obj, '_listeners', dict())

        # Register the listeners
        for val in itervalues(obj._prop_observers):
            handlers._set_listener(obj, val)

        # Set the GettableProperties from defaults - these are only set here
        for key, prop in iteritems(obj._props):
            if not isinstance(prop, basic.Property):
                if key in obj._defaults:
                    val = obj._defaults[key]
                else:
                    val = prop.default
                if val is utils.undefined:
                    continue
                if callable(val):
                    val = val()
                obj._backend[key] = prop.validate(obj, val)

        # Set the other defaults without triggering change notifications
        with handlers.listeners_disabled():
            obj._reset()
        obj.__init__(*args, **kwargs)
        return obj
def __call__ ( cls , * args , ** kwargs ) : obj = cls . __new__ ( cls , * args , ** kwargs ) object . __setattr__ ( obj , '_backend' , dict ( ) ) object . __setattr__ ( obj , '_listeners' , dict ( ) ) for val in itervalues ( obj . _prop_observers ) : handlers . _set_listener ( obj , val ) for key , prop in iteritems ( obj . _props ) : if not isinstance ( prop , basic . Property ) : if key in obj . _defaults : val = obj . _defaults [ key ] else : val = prop . default if val is utils . undefined : continue if callable ( val ) : val = val ( ) obj . _backend [ key ] = prop . validate ( obj , val ) with handlers . listeners_disabled ( ) : obj . _reset ( ) obj . __init__ ( * args , ** kwargs ) return obj
Here additional instance setup happens here before init is called

        This allows subclasses of :code:`HasProperties` to override
        the init method without worrying about breaking setup.