From: Martin Panter Date: Sun, 30 Oct 2016 05:41:04 +0000 (+0000) Subject: Issue #26638: Cannot directly link to main option from the “timeit” module X-Git-Tag: v2.7.13rc1~56 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=39d74a9108c403c0a2b394e2d95f9edf916326ce;p=python Issue #26638: Cannot directly link to main option from the “timeit” module This seems to be because the “timeit” module defines its own set of options --- 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