Skip to content

string split documentation unclear #133986

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

Closed
tml opened this issue May 14, 2025 · 0 comments
Closed

string split documentation unclear #133986

tml opened this issue May 14, 2025 · 0 comments
Labels
docs Documentation in the Doc dir

Comments

@tml
Copy link
Contributor

tml commented May 14, 2025

Documentation

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.

Linked PRs

@tml tml added the docs Documentation in the Doc dir label May 14, 2025
nedbat added a commit that referenced this issue May 14, 2025
…lit is 0 (#133987)

* Document string split algorithm when sep is None and maxsplit is 0

* Update Doc/library/stdtypes.rst

Co-authored-by: Semyon Moroz <donbarbos@proton.me>

---------

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 14, 2025
… maxsplit is 0 (pythonGH-133987)

* Document string split algorithm when sep is None and maxsplit is 0

* Update Doc/library/stdtypes.rst

Co-authored-by: Semyon Moroz <donbarbos@proton.me>

---------
(cherry picked from commit 3e23047)

Co-authored-by: Joey Smith <joeysmith@gmail.com>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 14, 2025
… maxsplit is 0 (pythonGH-133987)

* Document string split algorithm when sep is None and maxsplit is 0

* Update Doc/library/stdtypes.rst

Co-authored-by: Semyon Moroz <donbarbos@proton.me>

---------
(cherry picked from commit 3e23047)

Co-authored-by: Joey Smith <joeysmith@gmail.com>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
terryjreedy pushed a commit that referenced this issue May 15, 2025
…d maxsplit is 0 (GH-133987) (#133993)

---------
(cherry picked from commit 3e23047)

Co-authored-by: Joey Smith <joeysmith@gmail.com>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
terryjreedy pushed a commit that referenced this issue May 15, 2025
…d maxsplit is 0 (GH-133987) (#133992)

gh-133986: Document string split algorithm when sep is None and maxsplit is 0 (GH-133987)
---------
(cherry picked from commit 3e23047)

Co-authored-by: Joey Smith <joeysmith@gmail.com>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
Status: Todo
Development

No branches or pull requests

2 participants