From 39d74a9108c403c0a2b394e2d95f9edf916326ce Mon Sep 17 00:00:00 2001 From: Martin Panter Date: Sun, 30 Oct 2016 05:41:04 +0000 Subject: [PATCH] =?utf8?q?Issue=20#26638:=20Cannot=20directly=20link=20to?= =?utf8?q?=20main=20option=20from=20the=20=E2=80=9Ctimeit=E2=80=9D=20modul?= =?utf8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This seems to be because the “timeit” module defines its own set of options --- Doc/library/timeit.rst | 3 ++- Doc/using/cmdline.rst | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Doc/library/timeit.rst b/Doc/library/timeit.rst index e7b35489b1..7957910e0a 100644 --- a/Doc/library/timeit.rst +++ b/Doc/library/timeit.rst @@ -232,7 +232,8 @@ Unix, you can use :func:`time.clock` to measure CPU time. The code here doesn't try to hide it, but you should be aware of it. The baseline overhead can be measured by invoking the program without arguments, and it might differ between Python versions. Also, to fairly compare older Python - versions to Python 2.3, you may want to use Python's :option:`-O` option for + versions to Python 2.3, you may want to use Python's :option:`!-O` + option (see :ref:`Optimizations `) for the older versions to avoid timing ``SET_LINENO`` instructions. diff --git a/Doc/using/cmdline.rst b/Doc/using/cmdline.rst index 686fa24c59..c6b372b184 100644 --- a/Doc/using/cmdline.rst +++ b/Doc/using/cmdline.rst @@ -224,6 +224,7 @@ Miscellaneous options raises an exception. See also :envvar:`PYTHONINSPECT`. +.. _using-on-optimizations: .. cmdoption:: -O Turn on basic optimizations. This changes the filename extension for -- 2.50.1