]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Fix problem discovered by Greg McFarlane: when an imported module
authorGuido van Rossum <guido@python.org>
Thu, 10 Jul 1997 18:00:45 +0000 (18:00 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 10 Jul 1997 18:00:45 +0000 (18:00 +0000)
commitb65e85cb738e4bc555dd65111b57c56f27259677
tree6998d7bea6c42585c3e79669d251206fa462a5b8
parente6648967b703c5f8ee24c23d25be2d5ce5f963d5
Fix problem discovered by Greg McFarlane: when an imported module
replaces its own entry in sys.module, reference count errors ensue;
even if there is no reference count problem, it would be preferable
for the import to yield the new thing in sys.modules anyway (if only
because that's what later imports will yield).  This opens the road to
an official hack to implement a __getattr__ like feature for modules:
stick an instance in sys.modules[__name__].
Python/import.c