Skip to content

gh-100972: For command line examples in the documentation, use "python" rather than "python3" #100973

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Doc/c-api/init_config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,7 @@ PyConfig
without :option:`-c` or :option:`-m`. It is used by the
:c:func:`Py_RunMain` function.

For example, it is set to ``script.py`` by the ``python3 script.py arg``
For example, it is set to ``script.py`` by the ``python script.py arg``
command line.

See also the :c:member:`PyConfig.skip_source_first_line` option.
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/stdtypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5581,7 +5581,7 @@ command line flag to configure the limit:
``PYTHONINTMAXSTRDIGITS=640 python3`` to set the limit to 640 or
``PYTHONINTMAXSTRDIGITS=0 python3`` to disable the limitation.
* :option:`-X int_max_str_digits <-X>`, e.g.
``python3 -X int_max_str_digits=640``
``python -X int_max_str_digits=640``
* :data:`sys.flags.int_max_str_digits` contains the value of
:envvar:`PYTHONINTMAXSTRDIGITS` or :option:`-X int_max_str_digits <-X>`.
If both the env var and the ``-X`` option are set, the ``-X`` option takes
Expand Down
2 changes: 1 addition & 1 deletion Doc/using/cmdline.rst
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ Miscellaneous options
* ``-X importtime`` to show how long each import takes. It shows module
name, cumulative time (including nested imports) and self time (excluding
nested imports). Note that its output may be broken in multi-threaded
application. Typical usage is ``python3 -X importtime -c 'import
application. Typical usage is ``python -X importtime -c 'import
asyncio'``. See also :envvar:`PYTHONPROFILEIMPORTTIME`.
* ``-X dev``: enable :ref:`Python Development Mode <devmode>`, introducing
additional runtime checks that are too expensive to be enabled by
Expand Down
4 changes: 2 additions & 2 deletions Doc/whatsnew/3.10.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1539,8 +1539,8 @@ Optimizations
(Contributed by Serhiy Storchaka in :issue:`41334`.)

* The :mod:`runpy` module now imports fewer modules.
The ``python3 -m module-name`` command startup time is 1.4x faster in
average. On Linux, ``python3 -I -m module-name`` imports 69 modules on Python
The ``python -m module-name`` command startup time is 1.4x faster in
average. On Linux, ``python -I -m module-name`` imports 69 modules on Python
3.9, whereas it only imports 51 modules (-18) on Python 3.10.
(Contributed by Victor Stinner in :issue:`41006` and :issue:`41718`.)

Expand Down
2 changes: 1 addition & 1 deletion Doc/whatsnew/3.6.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2057,7 +2057,7 @@ should use :mod:`tkinter.ttk` instead.
venv
~~~~

The ``pyvenv`` script has been deprecated in favour of ``python3 -m venv``.
The ``pyvenv`` script has been deprecated in favour of ``python -m venv``.
This prevents confusion as to what Python interpreter ``pyvenv`` is
connected to and thus what Python interpreter will be used by the virtual
environment. (Contributed by Brett Cannon in :issue:`25154`.)
Expand Down
2 changes: 1 addition & 1 deletion Doc/whatsnew/3.9.rst
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ Other Language Changes
(Contributed by Ngalim Siregar in :issue:`37444`.)

* Python now gets the absolute path of the script filename specified on
the command line (ex: ``python3 script.py``): the ``__file__`` attribute of
the command line (ex: ``python script.py``): the ``__file__`` attribute of
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see much value in changing old release notes.

the :mod:`__main__` module became an absolute path, rather than a relative
path. These paths now remain valid after the current directory is changed
by :func:`os.chdir`. As a side effect, the traceback also displays the
Expand Down