[issue4285] Use a named tuple for sys.version_info

Nick Coghlan report at bugs.python.org
Mon Jan 26 02:42:27 CET 2009


Nick Coghlan <ncoghlan at gmail.com> added the comment:

Rather than deleting the isinstance() check from the tests completely, I
suggest changing it to be:

self.assert_(isinstance(vi[:], tuple))

Also, comparing directly with a tuple is also a fairly common use of
version_info so it would be worth adding a test to explicitly guarantee
that comparison:

self.assert_(vi > (1,0,0))

Patch applied and built cleanly for me, but I haven't checked the doc
build yet.

----------
nosy: +ncoghlan

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4285>
_______________________________________


More information about the Python-bugs-list mailing list