File tree 2 files changed +3
-1
lines changed
2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,8 @@ See :ref:`stable` for a discussion of API and ABI stability across versions.
58
58
Thus ``3.4.1a2 `` is hexversion ``0x030401a2 `` and ``3.10.0 `` is
59
59
hexversion ``0x030a00f0 ``.
60
60
61
+ Use this for numeric comparisons, e.g. ``#if PY_VERSION_HEX >= ... ``.
62
+
61
63
This version is also available via the symbol :data: `Py_Version `.
62
64
63
65
.. c :var :: const unsigned long Py_Version
Original file line number Diff line number Diff line change @@ -2319,7 +2319,7 @@ Porting to Python 3.11
2319
2319
can define the following macros and use them throughout
2320
2320
the code (credit: these were copied from the ``mypy `` codebase)::
2321
2321
2322
- #if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 8
2322
+ #if PY_VERSION_HEX >= 0x03080000
2323
2323
# define CPy_TRASHCAN_BEGIN(op, dealloc) Py_TRASHCAN_BEGIN(op, dealloc)
2324
2324
# define CPy_TRASHCAN_END(op) Py_TRASHCAN_END
2325
2325
#else
You can’t perform that action at this time.
0 commit comments