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/2004-December/050561.html below:

[Python-Dev] Re: [Pythonmac-SIG] The versioning question...

[Python-Dev] Re: [Pythonmac-SIG] The versioning question... [Python-Dev] Re: [Pythonmac-SIG] The versioning question...Eric Nieuwland eric.nieuwland at xs4all.nl
Tue Dec 28 09:22:08 CET 2004
Martin v. Löwis wrote:
> Eric Nieuwland wrote:
>> Would it be an idea to submit a PEP for extending the 'import' 
>> keyword?
>
> No. Normally, packages should aim for backwards compatibility, so that
> applications would only want to specify a minimum version, such as
>
> import xml
> assert xml.version_info > (0,8,2)
>
> If you really want side-by-side installation of different versions,
> and a mechanism to select between them, the package could support
>
> import xml_0_8_2 as xml
>
> IOW, "import-as" should be sufficient for what you want to achieve.

Unless you are doing comparison tests, where it would be nice to be 
able to state in a generic way that the new implementation should not 
change answers. May be something like:

import spam[1] as spamnext		# next version
import spam[0]	as spamnow		# current version

assert spamnow.Ni() == spamnext.Ni()

--eric

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