[Python-Dev] PEP 408 -- Standard library preview package (original) (raw)

Philippe Fremy phil at freehackers.org
Fri Jan 27 15:37:08 CET 2012


Hi,

A small comment from a user perspective.

Since a package in preview is strongly linked to a given version of Python, any program taking advantage of it becomes strongly specific to a given version of Python.

Such programs will of course break for any upgrade or downgrade of python version. To make the reason for the breakage more explicit, I believe that the PEP should provide examples of correct versionned usage of the module.

Something along the lines of :

if sys.version_info[:2] == (3, X): from preview import example else: raise ImportError( 'Package example is only available as preview in Python version 3.X. Please check the documentation of your version of Python to see if and how you can get the package example.' )

cheers,

Philippe



More information about the Python-Dev mailing list