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

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


> Do python-devers think we also need to make the other patchlevel.h
> constants available through sys?

Can't see why, but also can't see why not!

> If so, and because sys.hexversion is currently undocumented,

Since when has that ever stopped anyone :-)


> I'd
> propose making sys.hexversion a tuple of
>
>     (PY_VERSION_HEX, PY_MAJOR_VERSION, PY_MINOR_VERSION,
>      PY_MICRO_VERSION, PY_RELEASE_LEVEL, PY_RELEASE_SERIAL)
>
> or leaving sys.hexversion as is and crafting a new sys
> variable which
> is the [1:] of the tuple above.

My code already uses sys.hexversion to differentiate between 1.5 and
1.6, so if we do anything I would vote for a new name.

Personally however, I think the hexversion gives all the information
you need - ie, you either want a printable version - sys.version -
or a machine comparable version - sys.hexversion.  Can't really
think of a reason you would want the other attributes...

Mark.