[3.12] gh-106232: Make timeit doc command lines compatible with Windows. (GH-106296) (#106298)

gh-106232: Make timeit doc command lines compatible with Windows. (GH-106296)

Command Prompt (CMD Shell) and older versions of PowerShell
require double quotes and single quotes inside the string.
This form also works on linux and macOS.
(cherry picked from commit 04dfc6fa90)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
This commit is contained in:
Miss Islington (bot) 2023-06-30 19:40:43 -07:00 committed by GitHub
parent c4298d5c64
commit 8738c5bcee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 10 deletions

View file

@ -109,7 +109,7 @@ source.
Many standard library modules contain code that is invoked on their execution
as a script. An example is the :mod:`timeit` module::
python -m timeit -s 'setup here' 'benchmarked code here'
python -m timeit -s "setup here" "benchmarked code here"
python -m timeit -h # for details
.. audit-event:: cpython.run_module module-name cmdoption-m