mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
[3.13] gh-118915: C API: Document compiler flag macros (GH-129028) (GH-129086)
(cherry picked from commit 6e02096e2f
)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
This commit is contained in:
parent
8ab29d95a2
commit
972d95313c
1 changed files with 15 additions and 3 deletions
|
@ -348,8 +348,20 @@ the same library that the Python runtime is using.
|
|||
.. versionchanged:: 3.8
|
||||
Added *cf_feature_version* field.
|
||||
|
||||
The available compiler flags are accessible as macros:
|
||||
|
||||
.. c:var:: int CO_FUTURE_DIVISION
|
||||
.. c:namespace:: NULL
|
||||
|
||||
This bit can be set in *flags* to cause division operator ``/`` to be
|
||||
interpreted as "true division" according to :pep:`238`.
|
||||
.. c:macro:: PyCF_ALLOW_TOP_LEVEL_AWAIT
|
||||
PyCF_ONLY_AST
|
||||
PyCF_OPTIMIZED_AST
|
||||
PyCF_TYPE_COMMENTS
|
||||
|
||||
See :ref:`compiler flags <ast-compiler-flags>` in documentation of the
|
||||
:py:mod:`!ast` Python module, which exports these constants under
|
||||
the same names.
|
||||
|
||||
.. c:var:: int CO_FUTURE_DIVISION
|
||||
|
||||
This bit can be set in *flags* to cause division operator ``/`` to be
|
||||
interpreted as "true division" according to :pep:`238`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue