A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-January/115852.html below:

[Python-Dev] PEP 408 -- Standard library __preview__ package

[Python-Dev] PEP 408 -- Standard library __preview__ package [Python-Dev] PEP 408 -- Standard library __preview__ packagePhilippe 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

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4