Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jbrockmendel
Copy link
Member

@jbrockmendel jbrockmendel added this to the 3.0 milestone Nov 14, 2025
Copy link
Member

@rhshadrach rhshadrach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 on this approach, it seems superior to me than having case or flags take precedence over the other. Docstring could use updated.

Comment on lines 1424 to 1427
if case is lib.no_default:
if is_re(pat):
implicit_case = not bool(pat.flags & re.IGNORECASE)
case = True
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be:

Suggested change
if case is lib.no_default:
if is_re(pat):
implicit_case = not bool(pat.flags & re.IGNORECASE)
case = True
if case is lib.no_default:
if is_re(pat):
case = not bool(pat.flags & re.IGNORECASE)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: str.match and str.contains behave inconsistently on compiled regexps (regression in 2.3.2 relative to 2.3.1)

2 participants