From b3385648d79440585bb80161ba050fd91b273b23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Tue, 13 Aug 2019 08:15:30 +0200 Subject: [PATCH] Argparse --- README.md | 5 +++-- index.html | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3fb1636..df088bb 100644 --- a/README.md +++ b/README.md @@ -1407,7 +1407,7 @@ BaseException +-- UnicodeError # Raised when encoding/decoding strings from/to bytes fails. ``` -#### Collections and their execeptions: +#### Collections and their exceptions: ```python +-----------+------------+----------+----------+ | | list | dict | set | @@ -1480,7 +1480,8 @@ args = p.parse_args() value = args. ``` -* **Use `'help='` for argument description.** +* **Use `'help='` to set argument description.** +* **Use `'default='` to set the default value.** * **Use `'type=FileType()'` for files.** diff --git a/index.html b/index.html index 167fe6c..709433e 100644 --- a/index.html +++ b/index.html @@ -1309,7 +1309,7 @@ LogicOp = Enum('LogicOp', {Collections and their execeptions:
+-----------+------------+----------+----------+
+

Collections and their exceptions:

+-----------+------------+----------+----------+
 |           |    list    |   dict   |   set    |
 +-----------+------------+----------+----------+
 | getitem() | IndexError | KeyError |          |
@@ -1365,7 +1365,8 @@ value = args.<name>
 
    -
  • Use 'help=<str>' for argument description.
  • +
  • Use 'help=<str>' to set argument description.
  • +
  • Use 'default=<el>' to set the default value.
  • Use 'type=FileType(<mode>)' for files.

#Open

Opens a file and returns a corresponding file object.

<file> = open('<path>', mode='r', encoding=None, newline=None)