A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2000-April/003440.html below:

[Idle-dev] Forward progress with full backward compatibility

[Python-Dev] RE: [Idle-dev] Forward progress with full backward compatibility [Python-Dev] RE: [Idle-dev] Forward progress with full backward compatibilityMark 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.





RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4