[Python-checkins] cpython (2.7): Issue #26638: Cannot directly link to main option from the “timeit” module
martin.panter
python-checkins at python.org
Sun Oct 30 01:50:16 EDT 2016
https://hg.python.org/cpython/rev/cf91d48aa353
changeset: 104816:cf91d48aa353
branch: 2.7
user: Martin Panter <vadmium+py at gmail.com>
date: Sun Oct 30 05:41:04 2016 +0000
summary:
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
files:
Doc/library/timeit.rst | 3 ++-
Doc/using/cmdline.rst | 1 +
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Doc/library/timeit.rst b/Doc/library/timeit.rst
--- a/Doc/library/timeit.rst
+++ b/Doc/library/timeit.rst
@@ -232,7 +232,8 @@
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.
diff --git a/Doc/using/cmdline.rst b/Doc/using/cmdline.rst
--- a/Doc/using/cmdline.rst
+++ b/Doc/using/cmdline.rst
@@ -224,6 +224,7 @@
raises an exception. See also :envvar:`PYTHONINSPECT`.
+.. _using-on-optimizations:
.. cmdoption:: -O
Turn on basic optimizations. This changes the filename extension for
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list