dddp/__init__.py
def get(self, name, factory, *factory_args, **factory_kwargs):
        """Get attribute, creating if required using specified factory."""
        update_thread_local = getattr(factory, 'update_thread_local', True)
        if (not update_thread_local) or (name not in self.__dict__):
            obj = factory(*factory_args, **factory_kwargs)
            if update_thread_local:
                setattr(self, name, obj)
            return obj
        return getattr(self, name)
def get(self, name, factory, *factory_args, **factory_kwargs):
        """Get attribute, creating if required using specified factory."""
        update_thread_local = getattr(factory, 'update_thread_local', True)
        if (not update_thread_local) or (name not in self.__dict__):
            obj = factory(*factory_args, **factory_kwargs)
            if update_thread_local:
                setattr(self, name, obj)
            return obj
        return getattr(self, name)
def get ( self , name , factory , * factory_args , * * factory_kwargs ) : update_thread_local = getattr ( factory , 'update_thread_local' , True ) if ( not update_thread_local ) or ( name not in self . __dict__ ) : obj = factory ( * factory_args , * * factory_kwargs ) if update_thread_local : setattr ( self , name , obj ) return obj return getattr ( self , name )
Get attribute, creating if required using specified factory.
Get attribute creating if required using specified factory .