Skip to content

gh-137696: Rename 'fort' parameter to 'order' in PyBuffer_* functions #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.

@picnixz picnixz changed the title gh-137696: Rename 'fort' parameter to 'order' in PyBuffer_FromContiguous gh-137696: Rename 'fort' parameter to 'order' in PyBuffer_* functions Aug 18, 2025
@picnixz
Copy link
Member

picnixz commented Aug 18, 2025

Please see #137696 (comment) and change the functions (declarations and definitions) as well as the documentation so that all of them use 'order' instead of a mix of all. In addition, please sign the CLA.

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.

4 participants