Skip to content
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

gh-110383: Changed the doc for str.rsplit from 'starting from the left' to 'starting from the right' #111247

Closed
wants to merge 1 commit into from

Conversation

Unique-Usman
Copy link
Contributor

@Unique-Usman Unique-Usman commented Oct 24, 2023

Changed the doc for str.rsplit to be from 'starting from the left' to 'starting from the right' as str.rsplit start from the right

… 'starting from the right' as str.rsplit start from the right
@Unique-Usman Unique-Usman changed the title Changed the doc for str.rsplit to be from 'starting from the left' to… gh-110383: Changed the doc for str.rsplit from 'starting from the left' to 'starting from the right' Oct 24, 2023
@erlend-aasland
Copy link
Contributor

You need to change the clinic input code in Objects/unicodeobject.c. Directly manipulating the clinic output (anything that lives inside a clinic/ directory) will never work; future updates to the clinic input would overwrite such a change, but you'd never be able to check in such a change because we've got CI checks to prevent changes to generated code (see the "Check if generated files are up to date" CI check).

There's an Argument Clinic How-to in the devguide. I suggest you start with that, and then retarget this PR to change Objects/unicodeobject.c instead.

@Unique-Usman
Copy link
Contributor Author

Unique-Usman commented Nov 10, 2023

Yeah @erlend-aasland thanks for the suggestion, I will look into it.

@sparrowt
Copy link
Contributor

Looks like it's this line specifically the = str.split on the end that is "cloning" the per-parameter docstrings from split onto rsplit.

Given the docs say:

Sorry, there’s no syntax for partially cloning a function, or cloning a function then modifying it. Cloning is an all-or nothing proposition.

it seems like the only option is to stop cloning and then copy-paste the parameter docstrings from split here into rsplit here.

@sparrowt
Copy link
Contributor

I've opened #113353 which hopefully does the right thing

@erlend-aasland
Copy link
Contributor

I propose a different approach in #113355.

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.

None yet

3 participants