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

Commit0ceafa7

Browse files
Add re.VERBOSE flag documentation example (#97678)
The current re.VERBOSE documentation example leaves space for ambiguousinterpretation. One may read that spaces within the `(?:` token arespaces inside the non-capturing group (such as `(?: )`). This patchremoves the ambiguity by including examples after the statement.
1 parent395b66a commit0ceafa7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎Doc/library/re.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,8 @@ Flags
783783
more readable by allowing you to visually separate logical sections of the
784784
pattern and add comments. Whitespace within the pattern is ignored, except
785785
when in a character class, or when preceded by an unescaped backslash,
786-
or within tokens like ``*?``, ``(?:`` or ``(?P<...>``.
786+
or within tokens like ``*?``, ``(?:`` or ``(?P<...>``. For example, ``(? :``
787+
and ``* ?`` are not allowed.
787788
When a line contains a ``#`` that is not in a character class and is not
788789
preceded by an unescaped backslash, all characters from the leftmost such
789790
``#`` through the end of the line are ignored.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp