[Python-checkins] r82850 - python/branches/py3k/Lib/test/support.py
Brett Cannon
brett at python.org
Tue Jul 13 22:25:29 CEST 2010
Can I ask why you did this?
And just for historical background, the reason this was originally 0 instead
of None is that before absolute imports an entry in None was used to force
an absolute import instead of a relative import in a package. This doesn't
come into play in Python 3, though.
On Tue, Jul 13, 2010 at 07:50, alexander.belopolsky <
python-checkins at python.org> wrote:
> Author: alexander.belopolsky
> Date: Tue Jul 13 16:50:16 2010
> New Revision: 82850
>
> Log:
> Set sys.modules[name] to None instead of 0 to block module import.
>
> Modified:
> python/branches/py3k/Lib/test/support.py
>
> Modified: python/branches/py3k/Lib/test/support.py
>
> ==============================================================================
> --- python/branches/py3k/Lib/test/support.py (original)
> +++ python/branches/py3k/Lib/test/support.py Tue Jul 13 16:50:16 2010
> @@ -109,7 +109,7 @@
> orig_modules[name] = sys.modules[name]
> except KeyError:
> saved = False
> - sys.modules[name] = 0
> + sys.modules[name] = None
> return saved
>
>
> _______________________________________________
> Python-checkins mailing list
> Python-checkins at python.org
> http://mail.python.org/mailman/listinfo/python-checkins
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-checkins/attachments/20100713/fd76faad/attachment.html>
More information about the Python-checkins
mailing list