API and ABI Versioning
PY_VERSION_HEX is the Python version number encoded in a single integer.
For example if the PY_VERSION_HEX is set to 0x030401a2, the underlying version information can be found by treating it as a 32 bit number in the following manner:
Bytes | Bits (big endian order) | Meaning |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Thus 3.4.1a2 is hexversion 0x030401a2.
All the given macros are defined in Include/patchlevel.h.
© 2001–2022 Python Software Foundation
Licensed under the PSF License.
https://docs.python.org/3.9/c-api/apiabiversion.html