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

Appearance settings

Commit 12bd7e9

Browse filesBrowse files
miss-islingtonathos-ribeiro
authored andcommitted
Add re.VERBOSE flag documentation example (GH-97678)
The current re.VERBOSE documentation example leaves space for ambiguous interpretation. One may read that spaces within the `(?:` token are spaces inside the non-capturing group (such as `(?: )`). This patch removes the ambiguity by including examples after the statement. (cherry picked from commit 0ceafa7) Co-authored-by: Athos Ribeiro <athoscribeiro@gmail.com>
1 parent 5f43097 commit 12bd7e9
Copy full SHA for 12bd7e9

File tree

1 file changed

+2
-1
lines changed
Filter options

1 file changed

+2
-1
lines changed

‎Doc/library/re.rst

Copy file name to clipboardExpand all lines: Doc/library/re.rst
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,8 @@ Flags
781781
more readable by allowing you to visually separate logical sections of the
782782
pattern and add comments. Whitespace within the pattern is ignored, except
783783
when in a character class, or when preceded by an unescaped backslash,
784-
or within tokens like ``*?``, ``(?:`` or ``(?P<...>``.
784+
or within tokens like ``*?``, ``(?:`` or ``(?P<...>``. For example, ``(? :``
785+
and ``* ?`` are not allowed.
785786
When a line contains a ``#`` that is not in a character class and is not
786787
preceded by an unescaped backslash, all characters from the leftmost such
787788
``#`` through the end of the line are ignored.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.