From 078178902e3144aa3ba8353794f4e802f518d688 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Fri, 9 May 2025 21:13:57 +0200 Subject: [PATCH] Exceptions, Input --- README.md | 4 ++-- index.html | 4 ++-- parse.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a5e57cb..c906e61 100644 --- a/README.md +++ b/README.md @@ -1461,7 +1461,7 @@ BaseException | +-- ConnectionError # Errors such as BrokenPipeError/ConnectionAbortedError. +-- RuntimeError # Raised by errors that don't fall into other categories. | +-- NotImplementedEr… # Can be raised by abstract methods or by unfinished code. - | +-- RecursionError # Raised when the maximum recursion depth is exceeded. + | +-- RecursionError # Raised if max recursion depth is exceeded (3k by default). +-- StopIteration # Raised when an empty iterator is passed to next(). +-- TypeError # When an argument of the wrong type is passed to function. +-- ValueError # When argument has the right type but inappropriate value. @@ -1528,7 +1528,7 @@ Input ``` * **Reads a line from the user input or pipe if present (trailing newline gets stripped).** * **If argument is passed, it gets printed to the standard output before input is read.** -* **EOFError is raised if user hits EOF (ctrl-d/ctrl-z⏎) or input stream gets exhausted.** +* **EOFError is raised if user hits EOF (ctrl-d/ctrl-z⏎) or if input stream is exhausted.** Command Line Arguments diff --git a/index.html b/index.html index 9be5ffe..d2af9dd 100644 --- a/index.html +++ b/index.html @@ -1257,7 +1257,7 @@ error_msg = ''.join(traceback.format_exception( │ └── ConnectionError # Errors such as BrokenPipeError/ConnectionAbortedError. ├── RuntimeError # Raised by errors that don't fall into other categories. │ ├── NotImplementedEr… # Can be raised by abstract methods or by unfinished code. - │ └── RecursionError # Raised when the maximum recursion depth is exceeded. + │ └── RecursionError # Raised if max recursion depth is exceeded (3k by default). ├── StopIteration # Raised when an empty iterator is passed to next(). ├── TypeError # When an argument of the wrong type is passed to function. └── ValueError # When argument has the right type but inappropriate value. @@ -1310,7 +1310,7 @@ pprint(<collection>, width=80, depth=
  • Reads a line from the user input or pipe if present (trailing newline gets stripped).
  • If argument is passed, it gets printed to the standard output before input is read.
  • -
  • EOFError is raised if user hits EOF (ctrl-d/ctrl-z⏎) or input stream gets exhausted.
  • +
  • EOFError is raised if user hits EOF (ctrl-d/ctrl-z⏎) or if input stream is exhausted.
  • #Command Line Arguments

    import sys
     scripts_path = sys.argv[0]
    diff --git a/parse.js b/parse.js
    index c06fa0d..3d18669 100755
    --- a/parse.js
    +++ b/parse.js
    @@ -476,7 +476,7 @@ const DIAGRAM_7_B =
       "      │    └── ConnectionError    # Errors such as BrokenPipeError/ConnectionAbortedError.\n" +
       "      ├── RuntimeError            # Raised by errors that don't fall into other categories.\n" +
       "      │    ├── NotImplementedEr…  # Can be raised by abstract methods or by unfinished code.\n" +
    -  "      │    └── RecursionError     # Raised when the maximum recursion depth is exceeded.\n" +
    +  "      │    └── RecursionError     # Raised if max recursion depth is exceeded (3k by default).\n" +
       "      ├── StopIteration           # Raised when an empty iterator is passed to next().\n" +
       "      ├── TypeError               # When an argument of the wrong type is passed to function.\n" +
       "      └── ValueError              # When argument has the right type but inappropriate value.\n";