API와 ABI 버전 붙이기¶
CPython exposes its version number in the following macros. Note that these correspond to the version code is built with, not necessarily the version used at run time.
See C API Stability for a discussion of API and ABI stability across versions.
3.4.1a2. This can be
0xCfor release candidate or
3.4.1a2. Zero for final releases.
The Python version number encoded in a single integer.
The underlying version information can be found by treating it as a 32 bit number in the following manner:
비트 (빅 엔디안 순서)
Use this for numeric comparisons, e.g.
#if PY_VERSION_HEX >= ....
This version is also available via the symbol
const unsigned long Py_Version¶
- Part of the Stable ABI since version 3.11.
The Python runtime version number encoded in a single constant integer, with the same format as the
PY_VERSION_HEXmacro. This contains the Python version used at run time.
버전 3.11에 추가.
모든 주어진 매크로는 Include/patchlevel.h에 정의됩니다.