Skip to content

gh-137696: Rename 'fort' parameter to 'order' in PyBuffer_FromContiguous #137866

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

CarlosEduR
Copy link

@CarlosEduR CarlosEduR commented Aug 16, 2025

This PR updates the PyBuffer_FromContiguous function by renaming the fort parameter to order for clarity. The function's declaration in the header already uses order; this change updates all references in the implementation and documentation to match.

It also updates the declaration of the PyBuffer_IsContiguous function in the header by renaming fort to order. Its documentation and definition were already using order as the parameter name.


📚 Documentation preview 📚: https://cpython-previews--137866.org.readthedocs.build/

… 'order' to match its declaration. Update function comment to reflect new variable name as well.
@python-cla-bot
Copy link

python-cla-bot bot commented Aug 16, 2025

The following commit authors need to sign the Contributor License Agreement:

CLA signed

@bedevere-app

This comment was marked as resolved.

Copy contiguous *len* bytes from *buf* to *view*.
*fort* can be ``'C'`` or ``'F'`` (for C-style or Fortran-style ordering).
*order* can be ``'C'`` or ``'F'`` (for C-style or Fortran-style ordering).
Copy link
Contributor

Choose a reason for hiding this comment

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

The comment of the PyBuffer_FromContiguous explained the case when the order is A. So, I think we should add a line or two to explain that case in the documentation as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants