Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Doc/library/struct.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ The module defines the following exception and functions:
size required by the format, as reflected by :func:`calcsize`.


.. function:: unpack_from(format, /, buffer, offset=0)
.. function:: unpack_from(format, buffer, offset=0)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restore the positional-only marker for format

When callers follow this signature and pass format by keyword, struct.unpack_from(format='I', buffer=data) raises TypeError. The Argument Clinic declaration in Modules/_struct.c still places format before /, and the generated text signature remains unpack_from($module, format, /, buffer, offset=0), so removing this marker makes the documentation contradict the actual API.

Useful? React with 👍 / 👎.


Unpack from *buffer* starting at position *offset*, according to the format
string *format*. The result is a tuple even if it contains exactly one
Expand Down
Loading