[py-dev] From python-dev: Pep-364, Transitioning to the Py3K standard library

holger krekel holger at merlinux.de
Thu Mar 8 00:03:34 CET 2007


Hi Brian, 

On Wed, Mar 07, 2007 at 14:32 -0800, Brian Dorsey wrote:
> I just noticed that Barry Warsaw and Brett Cannon created a PEP for a
> mechanism for allowing modules to be imported under various aliases to
> enable the planned standard library re-organization. They recently
> announced it with a thread on python-dev.
> 
> http://www.python.org/dev/peps/pep-0364/
> 
> I know that various py-lib folks have given these topics quite a bit
> of thought - at least at the package namespace level. (I'm thinking of
> initpkg.py here) So, I thought there might be some interesting
> feedback about this PEP from the experience with initpkg.py.

thanks for the pointer.  Upon first read, i am a bit concerned
that it may complicate the importing mechanism further. 
Also, i wonder if the mechanisms and API introduced with 
PEP-364 maybe are over-general for the purpose of providing 
a new standard namespace.  

BTW, as it happens i was wondering this morning if
the py lib shouldn't provide some helpers for e.g.
StringIO and pickle-methods, maybe in its py.io namespace,
so you could do: 

    out = py.io.StringIO()
    py.io.pickle.dump(out, obj)
    ...
    
without importing anything else than the usual "import py" ahead. 
the "py.io.pickle" and StringIO would preferably be the c-versions
with a fallback to the python one. 

holger



More information about the Pytest-dev mailing list