]> granicus.if.org Git - python/commitdiff
Issue #26638: Cannot directly link to main option from the “timeit” module
authorMartin Panter <vadmium+py@gmail.com>
Sun, 30 Oct 2016 05:41:04 +0000 (05:41 +0000)
committerMartin Panter <vadmium+py@gmail.com>
Sun, 30 Oct 2016 05:41:04 +0000 (05:41 +0000)
This seems to be because the “timeit” module defines its own set of options

Doc/library/timeit.rst
Doc/using/cmdline.rst

index e7b35489b14e23f7ebb258c81b9bc43a7786aac8..7957910e0a2b95b2c6c782aa9b24d1b657c5297a 100644 (file)
@@ -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 <using-on-optimizations>`) for
    the older versions to avoid timing ``SET_LINENO`` instructions.
 
 
index 686fa24c597d1195cc10d4509e8b98cd153e8f71..c6b372b184a6515f57713c7ae597a9a8c8c54d2a 100644 (file)
@@ -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