Skip to content

Conversation

@mohsinm-dev
Copy link
Contributor

@mohsinm-dev mohsinm-dev commented Feb 11, 2026

The documentation for re.Match.group() incorrectly states that numeric group arguments must be in the inclusive range [1..99]. This limit was removed in Python 3.5 (bpo-22437) when the number of capturing groups became dynamic.

Replace [1..99] with "a positive integer" since the next sentence already documents the IndexError for out-of-range values.


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

The documentation incorrectly stated that numeric group arguments
must be in the range [1..99]. This limit was removed in Python 3.5
(bpo-22437). Replace with "a positive integer" since the next
sentence already documents the IndexError for out-of-range values.
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