On Tue, Oct 06, 2009 at 09:47:43AM -0500, Wayne wrote:
> On Tue, Oct 6, 2009 at 9:46 AM, Steve Willoughby <[email protected]> wrote:
> 
> > On Tue, Oct 06, 2009 at 09:42:04AM -0500, Wayne wrote:
> > > On Tue, Oct 6, 2009 at 9:26 AM, Christian Witts <[email protected]
> > >wrote:
> > > if sys.version < '2.4':
> > >    sys.exit("Need at least Python 2.4")
> > >
> > > AFAIK the string comparison is reliable
> >
> > Not quite. What happens when you compare '2.4' and '2.10'?
> >
> 
> >>> '2.4' > '2.10'
> True

Exactly.  So it doesn't work.

In typical software release numbering, 2.10 is the tenth
minor version of the 2.x major version series, so 2.10 is
later than 2.4, but comparing as ASCII strings, it comes
out the other way around.

Also note that '10.1' < '5.7'

-- 
Steve Willoughby    |  Using billion-dollar satellites
[email protected]   |  to hunt for Tupperware.
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to