Skip to content

Fix issue gh-94878: wrong example in stdlib tutorial #94880

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

Merged
merged 1 commit into from
Jul 16, 2022
Merged
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
12 changes: 8 additions & 4 deletions Doc/tutorial/stdlib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,15 @@ Command Line Arguments

Common utility scripts often need to process command line arguments. These
arguments are stored in the :mod:`sys` module's *argv* attribute as a list. For
instance the following output results from running ``python demo.py one two
three`` at the command line::
instance, let's take the following :file:`demo.py` file::

# File demo.py
import sys
print(sys.argv)

Here is the output from running ``python demo.py one two three`` at the command
line::

>>> import sys
>>> print(sys.argv)
['demo.py', 'one', 'two', 'three']

The :mod:`argparse` module provides a more sophisticated mechanism to process
Expand Down