diff options
author | Guido van Rossum <guido@python.org> | 2002-01-15 21:06:07 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2002-01-15 21:06:07 +0000 |
commit | 340cbe74b9e26823cdc7e7803e5fbdb9e6946f6e (patch) | |
tree | dedaef6fc6209d078062c27560fd24a39f30ae46 /Python/modsupport.c | |
parent | 7668957508a1129c2171e520471c453098588834 (diff) | |
download | cpython-git-340cbe74b9e26823cdc7e7803e5fbdb9e6946f6e.tar.gz |
A tentative fix for SF bug #503837 (Roeland Rengelink):
type.__module__ problems (again?)
This simply initializes the __module__ local in a class statement from
the __name__ global. I'm not 100% sure that this is the correct fix,
although it usually does the right thing. The problem is that if the
class statement executes in a custom namespace, the __name__ global
may be taken from __builtins__, in which case it would have the value
__builtin__, or it may not exist at all (if the custom namespace also
has a custom __builtins__), in which case the class statement will
fail.
Nevertheless, unless someone finds a better solution, this is a 2.2.1
bugfix too.
Diffstat (limited to 'Python/modsupport.c')
0 files changed, 0 insertions, 0 deletions