]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-102354: change python3 to python in docs examples (#102696)
authorPaul Watson <paul.hermeneutic@gmail.com>
Tue, 14 Mar 2023 18:40:12 +0000 (13:40 -0500)
committerGitHub <noreply@github.com>
Tue, 14 Mar 2023 18:40:12 +0000 (12:40 -0600)
Doc/library/__main__.rst
Doc/library/importlib.metadata.rst
Doc/library/pdb.rst
Doc/tutorial/venv.rst
Doc/using/venv-create.inc

index 6a2a7a7317f71143af69f212388b519e228b6733..761c88710f98910db8af3e12c93021dd3ff782ff 100644 (file)
@@ -259,7 +259,7 @@ one mentioned below are preferred.
 
    See :mod:`venv` for an example of a package with a minimal ``__main__.py``
    in the standard library. It doesn't contain a ``if __name__ == '__main__'``
-   block. You can invoke it with ``python3 -m venv [directory]``.
+   block. You can invoke it with ``python -m venv [directory]``.
 
    See :mod:`runpy` for more details on the :option:`-m` flag to the
    interpreter executable.
index 988d1a317f596029ff3aae12fef46dcf93c4abbb..6e084101995e2594cd9b75da944d5a506a9d4944 100644 (file)
@@ -73,7 +73,7 @@ something into it:
 
 .. code-block:: shell-session
 
-    $ python3 -m venv example
+    $ python -m venv example
     $ source example/bin/activate
     (example) $ python -m pip install wheel
 
index 4ae12a5d03a78dbd78f398362810b033b95fe28d..21c6ca8622dceb886b69d4e069ead7922587718d 100644 (file)
@@ -58,7 +58,7 @@ of the debugger is::
 :file:`pdb.py` can also be invoked as a script to debug other scripts.  For
 example::
 
-   python3 -m pdb myscript.py
+   python -m pdb myscript.py
 
 When invoked as a script, pdb will automatically enter post-mortem debugging if
 the program being debugged exits abnormally.  After post-mortem debugging (or
@@ -72,7 +72,7 @@ useful than quitting the debugger upon program's exit.
 
 .. versionadded:: 3.7
    :file:`pdb.py` now accepts a ``-m`` option that execute modules similar to the way
-   ``python3 -m`` does. As with a script, the debugger will pause execution just
+   ``python -m`` does. As with a script, the debugger will pause execution just
    before the first line of the module.
 
 
index 05f0e6bbcc1b04f133079e86aaf2ba8ef0c8d94f..d1bba098d7d23bf9202777f1ccfe156e0e9863ec 100644 (file)
@@ -44,7 +44,7 @@ whichever version you want.
 To create a virtual environment, decide upon a directory where you want to
 place it, and run the :mod:`venv` module as a script with the directory path::
 
-   python3 -m venv tutorial-env
+   python -m venv tutorial-env
 
 This will create the ``tutorial-env`` directory if it doesn't exist,
 and also create directories inside it containing a copy of the Python
index d535b254f05698bb2116a3c6018e56c86f9c750d..43ee6b7807d57e1093602f1bb832b9f3e5532b8a 100644 (file)
@@ -1,7 +1,7 @@
 Creation of :ref:`virtual environments <venv-def>` is done by executing the
 command ``venv``::
 
-    python3 -m venv /path/to/new/virtual/environment
+    python -m venv /path/to/new/virtual/environment
 
 Running this command creates the target directory (creating any parent
 directories that don't exist already) and places a ``pyvenv.cfg`` file in it