[issue2930] Cannot change variable defined in "__init__.py" after importing

Jörg Rebenstorf report at bugs.python.org
Wed May 21 09:32:46 CEST 2008


Jörg Rebenstorf <joerg.rebenstorf at tesbv.com> added the comment:

Oh yes, I am sorry, I forgot to tell you that I *cannot* change the 
import statement as it is part of a framwork by a third-party which I 
cannot influence. This is a prerequisite of my task.

Of course you are right that I am not strictly speaking about a bug but 
rather about a feature request if no appropriate solution exists.

One solution in my situation could be that I could re-import the 
package again using a plain import <package> statement (not a from-
import one as the framework does). Is this the recommended solution or 
shouldn't there be a way to modify the variable even if it is imported 
by a from-import statement?

Maybe you can give me a reason for your opinion?

----------
type: behavior -> feature request

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2930>
__________________________________


More information about the Python-bugs-list mailing list