We're back after a server migration that caused effbot.org to fall over a bit harder than expected. Expect some glitches.



The version number encoded as a single integer. This is guaranteed to increase with each version, including proper support for non-production releases. For example, to test that the Python interpreter is at least version 1.5.2 final, use:

if sys.hexversion >= 0x010502F0:
    # use some advanced feature
    # use an alternative implementation or warn the user

This is called “hexversion” since it only really looks meaningful when viewed as a hexadecimal number, such as the result of passing it to the built-in hex function. The sys.version_info value may be used for a more human-friendly encoding of the same information. New in version 1.5.2.