8000 Exceptions, Input · gto76/python-cheatsheet@0781789 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0781789

Browse files
committed
Exceptions, Input
1 parent df765fb commit 0781789

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1461,7 +1461,7 @@ BaseException
14611461
| +-- ConnectionError # Errors such as BrokenPipeError/ConnectionAbortedError.
14621462
+-- RuntimeError # Raised by errors that don't fall into other categories.
14631463
| +-- NotImplementedEr… # Can be raised by abstract methods or by unfinished code.
1464-
| +-- RecursionError # Raised when the maximum recursion depth is exceeded.
1464+
| +-- RecursionError # Raised if max recursion depth is exceeded (3k by default).
14651465
+-- StopIteration # Raised when an empty iterator is passed to next().
14661466
+-- TypeError # When an argument of the wrong type is passed to function.
14671467
+-- ValueError # When argument has the right type but inappropriate value.
@@ -1528,7 +1528,7 @@ Input
15281528
```
15291529
* **Reads a line from the user input or pipe if present (trailing newline gets stripped).**
15301530
* **If argument is passed, it gets printed to the standard output before input is read.**
1531-
* **EOFError is raised if user hits EOF (ctrl-d/ctrl-z⏎) or input stream gets exhausted.**
1531+
* **EOFError is raised if user hits EOF (ctrl-d/ctrl-z⏎) or if input stream is exhausted.**
15321532

15331533

15341534
Command Line Arguments

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,7 +1257,7 @@
12571257
│ └── ConnectionError <span class="hljs-comment"># Errors such as BrokenPipeError/ConnectionAbortedError.</span>
12581258
├── RuntimeError <span class="hljs-comment"># Raised by errors that don't fall into other categories.</span>
12591259
│ ├── NotImplementedEr… <span class="hljs-comment"># Can be raised by abstract methods or by unfinished code.</span>
1260-
│ └── RecursionError <span class="hljs-comment"># Raised when the maximum recursion depth is exceeded.</span>
1260+
│ └── RecursionError <span class="hljs-comment"># Raised if max recursion depth is exceeded (3k by default).</span>
12611261
├── StopIteration <span class="hljs-comment"># Raised when an empty iterator is passed to next().</span>
12621262
├── TypeError <span class="hljs-comment"># When an argument of the wrong type is passed to function.</span>
12631263
└── ValueError <span class="hljs-comment"># When argument has the right type but inappropriate value.</span>
@@ -1310,7 +1310,7 @@
13101310
<ul>
13111311
<li><strong>Reads a line from the user input or pipe if present (trailing newline gets stripped).</strong></li>
13121312
<li><strong>If argument is passed, it gets printed to the standard output before input is read.</strong></li>
1313-
<li><strong>EOFError is raised if user hits EOF (ctrl-d/ctrl-z⏎) or input stream gets exhausted.</strong></li>
1313+
<li><strong>EOFError is raised if user hits EOF (ctrl-d/ctrl-z⏎) or if input stream is exhausted.</strong></li>
13141314
</ul>
13151315
<div><h2 id="commandlinearguments"><a href="#commandlinearguments" name="commandlinearguments">#</a>Command Line Arguments</h2><pre><code class="python language-python hljs"><span class="hljs-keyword">import</span> sys
13161316
scripts_path = sys.argv[<span class="hljs-number">0</span>]

parse.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ const DIAGRAM_7_B =
476476
" │ └── ConnectionError <span class='hljs-comment'># Errors such as BrokenPipeError/ConnectionAbortedError.</span>\n" +
477477
" ├── RuntimeError <span class='hljs-comment'># Raised by errors that don't fall into other categories.</span>\n" +
478478
" │ ├── NotImplementedEr… <span class='hljs-comment'># Can be raised by abstract methods or by unfinished code.</span>\n" +
479-
" │ └── RecursionError <span class='hljs-comment'># Raised when the maximum recursion depth is exceeded.</span>\n" +
479+
" │ └── RecursionError <span class='hljs-comment'># Raised if max recursion depth is exceeded (3k by default).</span>\n" +
480480
" ├── StopIteration <span class='hljs-comment'># Raised when an empty iterator is passed to next().</span>\n" +
481481
" ├── TypeError <span class='hljs-comment'># When an argument of the wrong type is passed to function.</span>\n" +
482482
" └── ValueError <span class='hljs-comment'># When argument has the right type but inappropriate value.</span>\n";

0 commit comments

Comments
 (0)
0