[Python-3000] Will Py3K be friendlier to optimization opportunities?

skip at pobox.com skip at pobox.com
Thu Aug 30 04:23:48 CEST 2007


    skip> You can achieve these sorts of effects by assigning an object to
    skip> sys.modules[modulename].

I forgot you should always be able to assign to the module's __dict__
attribute as well:

    >>> import os
    >>> os.__dict__['foo'] = 'a'
    >>> os.foo
    'a'

S


More information about the Python-3000 mailing list