Skip to content

Cryptic deprecation notice in the re module #99308

Description

@Kentzo

Documentation

I'm confused by the following notice:

Deprecated since version 3.11: Group id containing anything except ASCII digits.

After some digging I found the related PR.

With the notice as is I would assume that non-ASCII digits would be interpreted as a name, but after reading the PR it's obvious that it cannot be the case since names must contain ASCII letters and digits.

Perhaps it's better to rewrite it to match the notice for re.sub:

Deprecated since version 3.11: Group id containing anything except ASCII digits. Group names containing non-ASCII characters in bytes replacement strings.

See https://discuss.python.org/t/cryptic-3-11-deprecation-notice-in-the-re-module-doc/20903

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions