GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
go4py.internals.facade.Facade Class Reference
+ Inheritance diagram for go4py.internals.facade.Facade:

Public Member Functions

 __init__ (self, modulename)
 
 __call__ (self, Interior)
 

Data Fields

 modulename = modulename
 

Detailed Description

Definition at line 5 of file facade.py.

Constructor & Destructor Documentation

◆ __init__()

go4py.internals.facade.Facade.__init__ ( self,
modulename )
Replaces a module with an instance of a types.ModuleType-based class
modulename is probably given by __name__ in that module

Example:
    @Facade(__name__)
    class AnInteriorClass(ModuleType):
        pass

Definition at line 7 of file facade.py.

Member Function Documentation

◆ __call__()

go4py.internals.facade.Facade.__call__ ( self,
Interior )
Replace current module with an instance of Interior in sys.modules
Update the globals of this instance from the globals of the module
Keep a reference to the overwritten "scaffold" module to avoid GC
cf. https://mail.python.org/pipermail/python-ideas/2012-May/014969.html

Definition at line 19 of file facade.py.

References modulename.

Field Documentation

◆ modulename

go4py.internals.facade.Facade.modulename = modulename

Definition at line 17 of file facade.py.

Referenced by __call__().


The documentation for this class was generated from the following file: