[Python-Dev] PEP 364, Transitioning to the Py3K standard library (original) (raw)

Barry Warsaw barry at python.org
Thu Mar 8 04:10:56 CET 2007


-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

On Mar 7, 2007, at 7:39 PM, Brett Cannon wrote:

I think it's important to import on demand only though. And I agree.

Cool.

I should probably make that clear in the PEP . IOW, "import email" should not by side-effect import all sub-modules just because there's a remapping involved. This actually would be quite easy to do, but it's one of the reasons why the Python 2.5 email package hack goes through so much trouble. I am not suggesting that every rename be imported. All I am saying is that a .pth file could import pkg.oldnames and that oldnames module adds the mappings, that's all. It doesn't do anything that you are not proposing be done automatically.

Cool, I see. What advantage do you see with importing the
pkg.old_names from a .pth file rather than just including whatever is
necessary right in pkg/init.py?

-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin)

iQCVAwUBRe9+wHEjvBPtnXfVAQI60AP8D7PFDNVR/BiLEoz8iQKYJUOsd8vtXTF5 lcmDi+L0SZ8N95KxlI2icQmaRk2wNhO+0Djp3XJA/aKiHTWa3ImIksuGFb7WIRSY HhSi2NXPRJOitHz3NhDrfMOFXbDq+Ci4E1YU/+XjtfnsEYqkcLvehvlpY3Urod/j Z/9g6BDGOuM= =pxLk -----END PGP SIGNATURE-----



More information about the Python-Dev mailing list