X Tutup
The Wayback Machine - https://web.archive.org/web/20250514044502/https://github.com/python/cpython/pull/133987
Skip to content

gh-133986: Document string split algorithm when sep is None and maxsplit is 0 #133987

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 1 commit into
base: main
Choose a base branch
from

Conversation

tml
Copy link

@tml tml commented May 14, 2025

If sep is not specified or is None and maxsplit is 0, only leading runs of consecutive whitespace are considered. This is contrary to (or, at least, underspecified in) the current documentation.

I have documented the observed behaviour, and added some example code.


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

@python-cla-bot
Copy link

python-cla-bot bot commented May 14, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review docs Documentation in the Doc dir skip news
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

1 participant
X Tutup