[issue47261] RFC: Clarify Limited API macros for PySequence_Fast

2022-04-08 Thread Rohit Goswami


New submission from Rohit Goswami :

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

--
messages: 416989
nosy: rgoswami
priority: normal
severity: normal
status: open
title: RFC: Clarify Limited API macros for PySequence_Fast

___
Python tracker 
<https://bugs.python.org/issue47261>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue47261] RFC: Clarify Limited API macros for PySequence_Fast

2022-04-08 Thread Rohit Goswami


Change by Rohit Goswami :


--
assignee:  -> docs@python
components: +C API, Documentation
nosy: +docs@python

___
Python tracker 
<https://bugs.python.org/issue47261>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue47261] RFC: Clarify Limited API macros for PySequence_Fast

2022-04-08 Thread Rohit Goswami


Rohit Goswami  added the comment:

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.

--

___
Python tracker 
<https://bugs.python.org/issue47261>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue47261] RFC: Clarify usage of macros for PySequence_Fast within the Limited C API

2022-04-08 Thread Rohit Goswami


Change by Rohit Goswami :


--
title: RFC: Clarify Limited API macros for PySequence_Fast -> RFC: Clarify 
usage of macros for PySequence_Fast within the Limited C API

___
Python tracker 
<https://bugs.python.org/issue47261>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com