Issue 47261: RFC: Clarify usage of macros for PySequence_Fast within the Limited C API (original) (raw)
Issue47261
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:58 | admin | set | github: 91417 |
2022-04-08 15:19:49 | rgoswami | set | title: 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🔞43 | rgoswami | set | messages: + |
2022-04-08 15:15:21 | rgoswami | set | assignee: docs@pythoncomponents: + Documentation, C APInosy: + docs@python |
2022-04-08 15:14:46 | rgoswami | create |