← 返回首页
Cryptic deprecation notice in the re module · Issue #99308 · python/cpython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Cryptic deprecation notice in the re module #99308

New issue
New issue

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    • Open in GitHub Copilot app

    Footer

    © 2026 GitHub, Inc.