]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-129851: Fix the documentation for -m command (GH-129862) (GH-150619) (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 30 May 2026 17:44:52 +0000 (19:44 +0200)
committerGitHub <noreply@github.com>
Sat, 30 May 2026 17:44:52 +0000 (20:44 +0300)
[3.14] gh-129851: Fix the documentation for -m command (GH-129862) (GH-150619)

(cherry picked from commit 9baa7c63bee1ad2b243f16109a3fd206a1f13a6a)
(cherry picked from commit 088c8ea18829c219d36441a8cb86da6da75fe755)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Dhruv Singla <68206552+d-s-dc@users.noreply.github.com>
Doc/using/cmdline.rst

index 38c4e9e0bb9081a0055f11c41b89b9601996b514..28a6d0bbbc8cdb19a9d4258575640c00549f91ae 100644 (file)
@@ -50,8 +50,8 @@ additional methods of invocation:
 * When called with ``-c command``, it executes the Python statement(s) given as
   *command*.  Here *command* may contain multiple statements separated by
   newlines. Leading whitespace is significant in Python statements!
-* When called with ``-m module-name``, the given module is located on the
-  Python module path and executed as a script.
+* When called with ``-m module-name``, the given module is located using the standard
+  import mechanism and executed as a script.
 
 In non-interactive mode, the entire input is parsed before it is executed.
 
@@ -75,8 +75,8 @@ source.
 
 .. option:: -m <module-name>
 
-   Search :data:`sys.path` for the named module and execute its contents as
-   the :mod:`__main__` module.
+   Locate the module using the standard import mechanism and execute its contents
+   as the :mod:`__main__` module.
 
    Since the argument is a *module* name, you must not give a file extension
    (``.py``).  The module name should be a valid absolute Python module name, but