[Python-Dev] module customization
Greg Ewing
greg.ewing at canterbury.ac.nz
Thu Nov 16 01:11:56 EST 2017
More information about the Python-Dev mailing list
Thu Nov 16 01:11:56 EST 2017
- Previous message (by thread): [Python-Dev] module customization
- Next message (by thread): [Python-Dev] module customization
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Ethan Furman wrote:
> The second way is fairly similar, but instead of replacing the entire
> sys.modules entry, its class is updated to be the class just created --
> something like sys.modules['mymod'].__class__ = MyNewClass .
If the recent suggestion to replace the global namespace
dict with the module object goes ahead, maybe it would enable
using this idiom to reassign the module class:
class __class__(__class__):
# module methods here
Badger-badger-badger-ly,
Greg
- Previous message (by thread): [Python-Dev] module customization
- Next message (by thread): [Python-Dev] module customization
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list