FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-95555: Fix a stale comment about negating \P in a character class by fedonman · Pull Request #156490 · python/cpython · GitHub

Repository navigation

Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
4 changes: 2 additions & 2 deletions Lib/test/test_re.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -1010,8 +1010,8 @@ def test_property_escapes(self):
with self.subTest(char=c):
self.assertEqual(bool(ci.fullmatch(c)), expect)
self.assertTrue(re.fullmatch(r'\p{Alphabetic=No}+', '123 '))
# These are engine categories, so (unlike \P of a multi-range
# property) they can be negated inside a character class.
# These are engine categories, so a negated one joins the set directly
# as a CATEGORY rather than being alternated in as a separate branch.
self.assertTrue(re.fullmatch(r'[\P{Alphabetic}]+', '123 .'))
self.assertTrue(re.fullmatch(r'[\p{XID_Start}_]+', 'foo_bar'))

Expand Down
Loading

Back | FazBrowse Home | New Git URL