diff -r 4658762a77cf Doc/library/sys.rst --- a/Doc/library/sys.rst Mon Apr 25 04:03:58 2011 +0200 +++ b/Doc/library/sys.rst Mon Apr 25 14:05:12 2011 -0400 @@ -539,7 +539,24 @@ as the result of passing it to the built-in :func:`hex` function. The ``version_info`` value may be used for a more human-friendly encoding of the same information. - + + The ``hexversion`` is a 32-bit number with the following layout + + +-------------------------+--------------------------------------------------------------------------------------+ + | bits (big endian order) | meaning | + +=========================+======================================================================================+ + | :const:`25-32` | PY_MAJOR_VERSION ``(the 2 in 2.1.0a3)`` | + +-------------------------+--------------------------------------------------------------------------------------+ + | :const:`17-24` | PY_MINOR_VERSION ``(the 1 in 2.1.0a3)`` | + +-------------------------+--------------------------------------------------------------------------------------+ + | :const:`9-16` | PY_MICRO_VERSION ``(the 0 in 2.1.0a3)`` | + +-------------------------+--------------------------------------------------------------------------------------+ + | :const:`5-8` | PY_RELEASE_LEVEL ``(0xA for alpha, 0xB for beta, 0xC for gamma and 0xF for final)``| + +-------------------------+--------------------------------------------------------------------------------------+ + | :const:`1-4` | PY_RELEASE_SERIAL ``(the 3 in 2.1.0a3)`` | + +-------------------------+--------------------------------------------------------------------------------------+ + + thus ``2.1.0a3`` is hexversion ``0x020100a3`` .. data:: int_info