Docs: Use PY_VERSION_HEX for version comparison (#100179)

This commit is contained in:
Hugo van Kemenade 2022-12-17 09:42:18 +02:00 committed by GitHub
parent 8edcb30c3f
commit 0264f634f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -58,6 +58,8 @@ See :ref:`stable` for a discussion of API and ABI stability across versions.
Thus ``3.4.1a2`` is hexversion ``0x030401a2`` and ``3.10.0`` is
hexversion ``0x030a00f0``.
Use this for numeric comparisons, e.g. ``#if PY_VERSION_HEX >= ...``.
This version is also available via the symbol :data:`Py_Version`.
.. c:var:: const unsigned long Py_Version