[Python-Dev] RE: [Idle-dev] Forward progress with full backward compatibility

Mark Hammond mhammond@skippinet.com.au
Thu, 13 Apr 2000 10:20:12 +1000


> > >>> hex(sys.hexversion)
> > '0x10600a1'
>
> bitmasks!?

Nah - a comparable number :-)

if sys.hexversion >= 0x01060100: # Require Python 1.6 or later!

Seems perfectly reasonable and understandable to me.  And much
cleaner than a tuple:

if tuple_version[0] > 1 or
   tuple_version[0] == 1 and tuple_version[6] >= 1:

etc

Unless Im missing the point - but I can't see any case other than
version comparisons in which hexversion is useful - so it seems
perfect to me.

> (ouch.  python is definitely not what it used to be.  wonder
> if the right answer to this is "wouldn't a tuple be much more
> python-like?" or "I'm outta here...")

Be sure to let us know.

Mark.