From 31a09652540f997195d74fc2c5f4411b76d482c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Tue, 10 Sep 2019 06:20:53 +0200 Subject: [PATCH] Argparse --- README.md | 4 ++-- index.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3337973..77f25b4 100644 --- a/README.md +++ b/README.md @@ -1446,7 +1446,7 @@ print(, ..., sep=' ', end='\n', file=sys.stdout, flush=False) from pprint import pprint pprint(, width=80, depth=None) ``` -* **Levels deeper than 'depth' will be replaced by '...'.** +* **Levels deeper than 'depth' get replaced by '...'.** Input @@ -1478,7 +1478,7 @@ p.add_argument('-', '--', type=) # Option p.add_argument('', type=, nargs=1) # First argument p.add_argument('', type=, nargs='+') # Remaining arguments p.add_argument('', type=, nargs='*') # Optional arguments -args = p.parse_args() +args = p.parse_args() # Exits on error. value = args. ``` diff --git a/index.html b/index.html index 44940bc..24d7daa 100644 --- a/index.html +++ b/index.html @@ -1343,7 +1343,7 @@ pprint(<collection>, width=80, depth=
    -
  • Levels deeper than 'depth' will be replaced by '…'.
  • +
  • Levels deeper than 'depth' get replaced by '…'.

#Input

  • Reads a line from user input or pipe if present.
  • @@ -1366,7 +1366,7 @@ p.add_argument('-<short_name>', '<name>', type=<type>, nargs=1) # First argument p.add_argument('<name>', type=<type>, nargs='+') # Remaining arguments p.add_argument('<name>', type=<type>, nargs='*') # Optional arguments -args = p.parse_args() +args = p.parse_args() # Exits on error. value = args.<name>