diff options
author | Victor Stinner <vstinner@python.org> | 2021-04-16 17:12:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-16 17:12:14 (GMT) |
commit | 62ec63864822de1dd1933225584e8503ac40c1f9 (patch) | |
tree | 4e150021e9606e833ae4d339b900f180f17677c6 /Doc/c-api | |
parent | 0ad81d4db2f409d72f469d0b74ab597be772a68e (diff) | |
download | cpython-62ec63864822de1dd1933225584e8503ac40c1f9.zip cpython-62ec63864822de1dd1933225584e8503ac40c1f9.tar.gz cpython-62ec63864822de1dd1933225584e8503ac40c1f9.tar.bz2 |
bpo-43862: Enhance -W cmdline option documentation (GH-25439)
The -W format is "action:message:category:module:lineno".
Update also the Python manual page.
Diffstat (limited to 'Doc/c-api')
-rw-r--r-- | Doc/c-api/init_config.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/c-api/init_config.rst b/Doc/c-api/init_config.rst index 5e9296a..325e607 100644 --- a/Doc/c-api/init_config.rst +++ b/Doc/c-api/init_config.rst @@ -1135,6 +1135,13 @@ PyConfig item of :data:`warnings.filters` which is checked first (highest priority). + The :option:`-W` command line options adds its value to + :c:member:`~PyConfig.warnoptions`, it can be used multiple times. + + The :envvar:`PYTHONWARNINGS` environment variable can also be used to add + warning options. Multiple options can be specified, separated by commas + (``,``). + Default: empty list. .. c:member:: int write_bytecode |