[Python-ideas] Keyword to disambiguate python version

Jonny jwringstad at gmail.com
Fri Aug 27 00:11:40 CEST 2010


> However, depriving a user from the freedom to do as he pleases
> (in this case, dictating what environment to use) is a disastrous mistake.
That's a valid criticism, but maybe python could still warn about the
mismatch, even if it would not reject the program by default.

> 1) It's not version number that matters, it's functionality. There are
> environments you can't even imagine where your code can be run.
> There are Python builds and flavours outside the CPython's version sequence.
I agree, but there are also environments that I can determine not
being able to run my code, and then I could warn on those.
As to CPython, etc., maybe those can match against a "normalized"
version number that they claim to be compatible with.

> The right place to tell a user the environment your code was written for is
> documentation. A user just needs to know where to rely on you and where to take
> responsibility his/herself.
I guess you are right about that. And for the really important cases,
I suppose performing a check in the makefile, or, if everything else
fails, directly in the code (yuck) should suffice.



More information about the Python-ideas mailing list