platform.python_version_tuple

Rotem vmalloc at gmail.com
Tue Nov 21 09:53:56 CET 2006


Hi Everyone,

I've been wondering about platform.python_version_tuple API, which is a
bit misleading.
The fact is that this returns under both python2.4 and 2.5 a list, and
not a tuple.

This introduces strange semantics, due to __cmp__ on lists and tuples.

platform.python_version_tuple() >= ('2', '5')   # returns False under
python 2.5
platform.python_version_tuple() >= ['2', '5']   # returns True under
python 2.5

I believe this should be changed, especially since the word 'tuple'
appears in the function name...

What do you think?




More information about the Python-list mailing list