[Python-Dev] PEP 408 -- Standard library __preview__ package
phil at freehackers.org
Fri Jan 27 15:37:08 CET 2012
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
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.' )
More information about the Python-Dev