aleaxit at yahoo.com
Mon Oct 13 00:42:12 CEST 2003
Sean Ross wrote:
> I'm not sure I'm clear on what behaviour "import __current_module__" is
> expected to have.
Just like any other import, it binds the name to a module object -- except
that it specifically binds said name to the module containing the function
that executes this import statement. The use case is: deprecating the
global statement. Setting a global variable would instead use:
__current_module__.thevariable = 23
So, your version does something very different from mine.
More information about the Python-list