Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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

Provide feedback

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

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

AttributeError when copying flags in there module. #93820

Closed
Assignees
ethanfurman
@pschanely

Description

@pschanely

Bug report

In CPython 3.11, I've noticed that an attempt to copy (combined) regular expression flags fails with an attribute error; like so:

>>> import copy, re>>> copy.copy(re.A | re.I)Traceback (most recent call last):  File "<stdin>", line 1, in <module>  File "lib/python3.11/copy.py", line 102, in copy    return _reconstruct(x, None, *rv)           ^^^^^^^^^^^^^^^^^^^^^^^^^^  File "lib/python3.11/copy.py", line 265, in _reconstruct    y = func(*args)        ^^^^^^^^^^^  File "lib/python3.11/enum.py", line 862, in __getattr__    raise AttributeError(name) from None    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^AttributeError: ASCII|IGNORECASE

Your environment

  • CPython versions tested on: 3.11.0b3
  • Operating system and architecture: macOS 10.15.7

Background

This behavior was detected from aCrossHair test failure here, in which we realize possibly symbolic arguments prior to regex compilation. (it's an esoteric use case, and I expect not very high priority)

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp