On 4/29/08, Brett Cannon <[EMAIL PROTECTED]> wrote:
> On Tue, Apr 29, 2008 at 5:07 AM, Nick Coghlan <[EMAIL PROTECTED]> wrote:
>  > Raymond Hettinger wrote:
>  > > > For modules that are renamed, stub modules will be created with the
>  > > > original names ...

>  > > What is the purpose of the new directory?  Are there some use
>  > > cases for intermixing the new and old names?  Is there something
>  > > that the 2-to-3 converter won't be able to handle?

People can start using the new "proper" names immediately.

People can reduce the number of changes for which they rely on 2-to-3.

>  >  I'd like to see the PEP address the question of how it is going to deal
>  > with getting duplicate copies of modules in sys.modules when some code in 
> an
>  > application uses the old name and some code uses the new name.

> There is not much that can be done without introducing a custom
>  importer to handle the mapping of names in sys.modules to the same
>  module object. Otherwise it's going to be done using ``from _ import
>  *``.

The following worked on python 2.5

zort.py
---------

import sys
import collections
sys.modules[__name__]=collections

>>> import zort
>>> zort is collections
True
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to