From 2be673e54a023339537fa1d31b6086ad2e9b8394 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Sat, 8 May 2021 19:58:01 +0100 Subject: [PATCH] PEP 657: Clarifications regarding optimized mode --- pep-0657.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pep-0657.rst b/pep-0657.rst index 51fd150b90e..0ff80e77140 100644 --- a/pep-0657.rst +++ b/pep-0657.rst @@ -167,8 +167,8 @@ the program. We understand that the extra cost of this information may not be acceptable for some users, so we propose an opt-out mechanism when Python is executed in -optimized mode (``python -O``), which will cause pyo files to not include the -extra information. +"opt-2" optimized mode (``python -OO``), which will cause pyc files to not include +the extra information. Specification @@ -299,15 +299,15 @@ Opt-out mechanism To offer an opt-out mechanism for those users that care about the storage and memory overhead, the functionality will be deactivated along with the extra -information when Python is executed in optimized mode (``python -O``) resulting -in ``pyo`` files not having the overhead associated with the extra required -data. +information when Python is executed in "opt-2" optimized mode (``python -OO``) +resulting in ``pyc`` files not having the overhead associated with the extra +required data. To allow third party tools and other programs that are currently parsing tracebacks to catch up and to allow users to deactivate the new feature, the following methods will be provided to deactivate displaying the new highlight carets (but not to avoid to storing the data, users will need to use Python in -optimized mode for that): +"opt-2" optimized mode for that): * A new environment variable: ``PY_DEACTIVATE_TRACEBACK_RANGES`` * A new command line option for the dev mode: ``python -Xnotracebackranges``.