b.l.ScopeReplacer(object) : class documentation

Part of bzrlib.lazy_import View In Hierarchy

Known subclasses: bzrlib.lazy_import.ImportReplacer, bzrlib.tests.test_lazy_import.InstrumentedReplacer

A lazy object that will replace itself in the appropriate scope.

This object sits, ready to create the real object the first time it is needed.

Method __init__ Create a temporary object in the specified scope.
Method __getattribute__ Undocumented
Method __setattr__ Undocumented
Method __call__ Undocumented
Method _replace Actually replace self with other in the given scope
Method _cleanup Stop holding on to all the extra stuff
def __init__(self, scope, factory, name):
Create a temporary object in the specified scope. Once used, a real object will be placed in the scope.
ParametersscopeThe scope the object should appear in
factoryA callable that will create the real object. It will be passed (self, scope, name)
nameThe variable name in the given scope.
def _replace(self):
Actually replace self with other in the given scope
def _cleanup(self):
Stop holding on to all the extra stuff
def __getattribute__(self, attr):
Undocumented
def __setattr__(self, attr, value):
Undocumented
def __call__(self, *args, **kwargs):
Undocumented
API Documentation for Bazaar, generated by pydoctor at 2019-07-22 00:30:44.