File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1972,7 +1972,8 @@ Loading and running tests
19721972 methods <deprecated-aliases>` are also special-cased and, when the warning
19731973 filters are ``'default' `` or ``'always' ``, they will appear only once
19741974 per-module, in order to avoid too many warning messages. This behavior can
1975- be overridden using the :option: `-Wd ` or :option: `-Wa ` options and leaving
1975+ be overridden using Python's :option: `!-Wd ` or :option: `!-Wa ` options
1976+ (see :ref: `Warning control <using-on-warnings >`) and leaving
19761977 *warnings * to ``None ``.
19771978
19781979 .. versionchanged :: 3.2
@@ -2053,7 +2054,8 @@ Loading and running tests
20532054
20542055 The *warnings * argument specifies the :ref: `warning filter <warning-filter >`
20552056 that should be used while running the tests. If it's not specified, it will
2056- remain ``None `` if a :option: `-W ` option is passed to :program: `python `,
2057+ remain ``None `` if a :option: `!-W ` option is passed to :program: `python `
2058+ (see :ref: `Warning control <using-on-warnings >`),
20572059 otherwise it will be set to ``'default' ``.
20582060
20592061 Calling ``main `` actually returns an instance of the ``TestProgram `` class.
Original file line number Diff line number Diff line change @@ -313,6 +313,7 @@ Miscellaneous options
313313 See also :envvar: `PYTHONVERBOSE `.
314314
315315
316+ .. _using-on-warnings :
316317.. cmdoption :: -W arg
317318
318319 Warning control. Python's warning machinery by default prints warning
Original file line number Diff line number Diff line change @@ -758,7 +758,7 @@ Here are the changes 2.2 introduces:
758758 operators.
759759
760760* Python 2.2 supports some command-line arguments for testing whether code will
761- work with the changed division semantics. Running python with :option: `-Q
761+ work with the changed division semantics. Running python with :option: `! -Q
762762 warn ` will cause a warning to be issued whenever division is applied to two
763763 integers. You can use this to find code that's affected by the change and fix
764764 it. By default, Python 2.2 will simply perform classic division without a
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ Python 2.6 incorporates new features and syntax from 3.0 while
5858remaining compatible with existing code by not removing older features
5959or syntax. When it's not possible to do that, Python 2.6 tries to do
6060what it can, adding compatibility functions in a
61- :mod: `future_builtins ` module and a :option: `-3 ` switch to warn about
61+ :mod: `future_builtins ` module and a :option: `! -3 ` switch to warn about
6262usages that will become unsupported in 3.0.
6363
6464Some significant new packages have been added to the standard library,
@@ -116,7 +116,7 @@ module has versions with the new 3.0 semantics. Code written to be
116116compatible with 3.0 can do ``from future_builtins import hex, map `` as
117117necessary.
118118
119- A new command-line switch, :option: `-3 `, enables warnings
119+ A new command-line switch, :option: `! -3 `, enables warnings
120120about features that will be removed in Python 3.0. You can run code
121121with this switch to see how much work will be necessary to port
122122code to 3.0. The value of this switch is available
Original file line number Diff line number Diff line change @@ -198,8 +198,8 @@ Other new Python3-mode warnings include:
198198
199199* :func: `operator.isCallable ` and :func: `operator.sequenceIncludes `,
200200 which are not supported in 3.x, now trigger warnings.
201- * The :option: `-3 ` switch now automatically
202- enables the :option: `-Qwarn <-Q> ` switch that causes warnings
201+ * The :option: `! -3 ` switch now automatically
202+ enables the :option: `! -Qwarn ` switch that causes warnings
203203 about using classic division with integers and long integers.
204204
205205
You can’t perform that action at this time.
0 commit comments