This can be ``0xA`` for alpha, ``0xB`` for beta, ``0xC`` for release
candidate or ``0xF`` for final.
+
+ .. c:namespace:: NULL
+ .. c:macro:: PY_RELEASE_LEVEL_ALPHA
+ :no-typesetting:
+ .. c:macro:: PY_RELEASE_LEVEL_BETA
+ :no-typesetting:
+ .. c:macro:: PY_RELEASE_LEVEL_GAMMA
+ :no-typesetting:
+ .. c:macro:: PY_RELEASE_LEVEL_FINAL
+ :no-typesetting:
+
+ For completeness, the values are available as macros:
+ :c:macro:`!PY_RELEASE_LEVEL_ALPHA` (``0xA``),
+ :c:macro:`!PY_RELEASE_LEVEL_BETA` (``0xB``),
+ :c:macro:`!PY_RELEASE_LEVEL_GAMMA` (``0xC``), and
+ :c:macro:`!PY_RELEASE_LEVEL_FINAL` (``0xF``).
+
.. c:macro:: PY_RELEASE_SERIAL
The ``2`` in ``3.4.1a2``. Zero for final releases.
Use this for numeric comparisons, for example,
``#if PY_VERSION_HEX >= ...``.
+.. c:macro:: PY_VERSION
+
+ The Python version as a string, for example, ``"3.4.1a2"``.
+
Run-time version
----------------
.. versionadded:: 3.5
.. c:macro:: PYTHON_API_VERSION
+ PYTHON_API_STRING
- The C API version. Defined for backwards compatibility.
+ The C API version, as an integer (``1013``) and string (``"1013"``), respectively.
+ Defined for backwards compatibility.
Currently, this constant is not updated in new Python versions, and is not
useful for versioning. This may change in the future.
.. c:macro:: PYTHON_ABI_VERSION
+ PYTHON_ABI_STRING
- Defined as ``3`` for backwards compatibility.
+ Defined as ``3`` and ``"3"``, respectively, for backwards compatibility.
Currently, this constant is not updated in new Python versions, and is not
useful for versioning. This may change in the future.