
On Thu, 31 Aug 2000, Fred L. Drake, Jr. wrote:
Paul F. Dubois writes:
And THAT works? comparison of tuples is lexographic? Really? This sig is full of odd things.
The values in the tuple are integers, not strings:
Python 2.0b1 (#248, Aug 31 2000, 00:55:23) [GCC 2.95.3 19991030 (prerelease)] on linux2 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam Copyright 1995-2000 Corporation for National Research Initiatives (CNRI)
sys.version_info (2, 0, 0, 'beta', 1)
The values for the fourth entry are specifically chosen so that lexicographic comparison works:
"alpha" < "beta" < "candidate" < "final"
-Fred
-- Fred L. Drake, Jr. <fdrake at beopen.com> BeOpen PythonLabs Team Member
What I meant was that I hadn't known that comparison of tuples was meaningful at all; evidently you are teaching me that the comparisons of tuples are lexographic in the sense that it compares the first entries and only proceeds to the next component if the first entries are equal, etc. Python is full of little surprises, almost always pleasant.