Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Doc/library/warnings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ the disposition of the match. Each entry is a tuple of the form (*action*,

* *message* is a string containing a regular expression that the start of
the warning message must match, case-insensitively. In :option:`-W` and
:envvar:`PYTHONWARNINGS`, if *message* starts and ends with a forward slash
(``/``), it specifies a regular expression as above;
otherwise it is a literal string that the start of the
:envvar:`PYTHONWARNINGS`, if *message* is at least two characters long and
starts and ends with a forward slash (``/``), it specifies a regular
expression as above; otherwise it is a literal string that the start of the
warning message must match (case-insensitively), ignoring any whitespace at
the start or end of *message*.

Expand All @@ -170,9 +170,9 @@ the disposition of the match. Each entry is a tuple of the form (*action*,

* *module* is a string containing a regular expression that the start of the
fully qualified module name must match, case-sensitively. In :option:`-W` and
:envvar:`PYTHONWARNINGS`, if *module* starts and ends with a forward slash
(``/``), it specifies a regular expression as above;
otherwise it is a literal string that the
:envvar:`PYTHONWARNINGS`, if *module* is at least two characters long and
starts and ends with a forward slash (``/``), it specifies a regular
expression as above; otherwise it is a literal string that the
fully qualified module name must be equal to (case-sensitively), ignoring any
whitespace at the start or end of *module*.

Expand Down
13 changes: 7 additions & 6 deletions Doc/using/cmdline.rst
Original file line number Diff line number Diff line change
Expand Up @@ -481,8 +481,9 @@ Miscellaneous options

The *message* field must match the start of the warning message;
this match is case-insensitive.
If it starts and ends with a forward slash (``/``), it specifies
a regular expression, otherwise it specifies a literal string.
If it is at least two characters long and starts and ends with a forward
slash (``/``), it specifies a regular expression, otherwise it specifies a
literal string.

The *category* field matches the warning category
(ex: ``DeprecationWarning``). This must be a class name; the match test
Expand All @@ -491,10 +492,10 @@ Miscellaneous options

The *module* field matches the (fully qualified) module name; this match is
case-sensitive.
If it starts and ends with a forward slash (``/``), it specifies
a regular expression that the start of the fully qualified module name
must match, otherwise it specifies a literal string that the fully
qualified module name must be equal to.
If it is at least two characters long and starts and ends with a forward
slash (``/``), it specifies a regular expression that the start of the fully
qualified module name must match, otherwise it specifies a literal string
that the fully qualified module name must be equal to.

The *lineno* field matches the line number, where zero matches all line
numbers and is thus equivalent to an omitted line number.
Expand Down
Loading