homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: RFC: Clarify usage of macros for PySequence_Fast within the Limited C API
Type: Stage:
Components: C API, Documentation Versions:
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, rgoswami
Priority: normal Keywords:

Created on 2022年04月08日 15:14 by rgoswami, last changed 2022年04月11日 14:59 by admin.

Messages (2)
msg416989 - (view) Author: Rohit Goswami (rgoswami) * Date: 2022年04月08日 15:14
The `current documentation`_ of the Python-C API mentions that ``PySequence_Fast`` is part of the limited API. However, this may be a typo as all the functions interacting with a ``PySequence_Fast`` object are macros, e.g. `PySequence_Fast_GET_SIZE`, `PySequence_Fast_GET_ITEM` etc.
If this is indeed a documentation bug I'm happy to open a PR to fix this once consensus is reached.
.. _`current documentation` : https://docs.python.org/3/c-api/stable.html#contents-of-limited-api 
msg416990 - (view) Author: Rohit Goswami (rgoswami) * Date: 2022年04月08日 15:18
Perhaps to be clear, there are two possibilities:
1. `PySequence_Fast` should be removed from the Limited API
2. All macros used with `PySequence_Fast` are valid for use in the context of the Limited API
In either case the documentation should need to be clarified.
The only situation where no changes would result is if:
- `PySequence_Fast` is part of the Limited API, but must be treated the same as a regular `PySequence` object
 + Since only `PySequence_Size` and other variants can be used in the context of the Limited API
This is actually also still confusing and should be mentioned clearly.
History
Date User Action Args
2022年04月11日 14:59:58adminsetgithub: 91417
2022年04月08日 15:19:49rgoswamisettitle: RFC: Clarify Limited API macros for PySequence_Fast -> RFC: Clarify usage of macros for PySequence_Fast within the Limited C API
2022年04月08日 15:18:43rgoswamisetmessages: + msg416990
2022年04月08日 15:15:21rgoswamisetassignee: docs@python

components: + Documentation, C API
nosy: + docs@python
2022年04月08日 15:14:46rgoswamicreate

AltStyle によって変換されたページ (->オリジナル) /