Browse Source

Exceptions

pull/52/head
Jure Šorn 4 years ago
parent
commit
abeffbe48c
3 changed files with 5 additions and 5 deletions
  1. 4
      README.md
  2. 4
      index.html
  3. 2
      web/script_2.js

4
README.md

@ -1146,7 +1146,7 @@ class Counter:
```
#### Python has many different iterator objects:
* **Iterators returned by the [iter()](#iterator) function, such as list\_iterator and set\_iterator.**
* **Objects returned by the [iter()](#iterator) function, such as list\_iterator and set\_iterator.**
* **Objects returned by the [itertools](#itertools) module, such as count, repeat and cycle.**
* **Generators returned by the [generator functions](#generator) and [generator expressions](#comprehension).**
* **File objects returned by the [open()](#open) function, etc.**
@ -1404,7 +1404,6 @@ BaseException
+-- SystemExit # Raised by the sys.exit() function.
+-- KeyboardInterrupt # Raised when the user hits the interrupt key (ctrl-c).
+-- Exception # User-defined exceptions should be derived from this class.
+-- StopIteration # Raised by next() when run on an empty iterator.
+-- ArithmeticError # Base class for arithmetic errors.
| +-- ZeroDivisionError # Raised when dividing by zero.
+-- AttributeError # Raised when an attribute is missing.
@ -1417,6 +1416,7 @@ BaseException
| +-- FileNotFoundError # When a file or directory is requested but doesn't exist.
+-- RuntimeError # Raised by errors that don't fall in other categories.
| +-- RecursionError # Raised when the maximum recursion depth is exceeded.
+-- StopIteration # Raised by next() when run on an empty iterator.
+-- TypeError # Raised when an argument is of wrong type.
+-- ValueError # When an argument is of right type but inappropriate value.
+-- UnicodeError # Raised when encoding/decoding strings from/to bytes fails.

4
index.html

@ -1093,7 +1093,7 @@ Z = dataclasses.make_dataclass(<span class="hljs-string">'Z'</span>, [<span clas
(<span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span>)
</code></pre>
<div><h4 id="pythonhasmanydifferentiteratorobjects">Python has many different iterator objects:</h4><ul>
<li><strong>Iterators returned by the <a href="#iterator">iter()</a> function, such as list_iterator and set_iterator.</strong></li>
<li><strong>Objects returned by the <a href="#iterator">iter()</a> function, such as list_iterator and set_iterator.</strong></li>
<li><strong>Objects returned by the <a href="#itertools">itertools</a> module, such as count, repeat and cycle.</strong></li>
<li><strong>Generators returned by the <a href="#generator">generator functions</a> and <a href="#comprehension">generator expressions</a>.</strong></li>
<li><strong>File objects returned by the <a href="#open">open()</a> function, etc.</strong></li>
@ -1318,7 +1318,6 @@ error_msg = traceback.format_exception(exc_type, &lt;name&gt;, &lt;name&gt;.__
+-- SystemExit # Raised by the sys.exit() function.
+-- KeyboardInterrupt # Raised when the user hits the interrupt key (ctrl-c).
+-- Exception # User-defined exceptions should be derived from this class.
+-- StopIteration # Raised by next() when run on an empty iterator.
+-- ArithmeticError # Base class for arithmetic errors.
| +-- ZeroDivisionError # Raised when dividing by zero.
+-- AttributeError # Raised when an attribute is missing.
@ -1331,6 +1330,7 @@ error_msg = traceback.format_exception(exc_type, &lt;name&gt;, &lt;name&gt;.__
| +-- FileNotFoundError # When a file or directory is requested but doesn't exist.
+-- RuntimeError # Raised by errors that don't fall in other categories.
| +-- RecursionError # Raised when the maximum recursion depth is exceeded.
+-- StopIteration # Raised by next() when run on an empty iterator.
+-- TypeError # Raised when an argument is of wrong type.
+-- ValueError # When an argument is of right type but inappropriate value.
+-- UnicodeError # Raised when encoding/decoding strings from/to bytes fails.

2
web/script_2.js

@ -168,7 +168,6 @@ const DIAGRAM_8_B =
" ├── SystemExit <span class='hljs-comment'># Raised by the sys.exit() function.</span>\n" +
" ├── KeyboardInterrupt <span class='hljs-comment'># Raised when the user hits the interrupt key (ctrl-c).</span>\n" +
" └── Exception <span class='hljs-comment'># User-defined exceptions should be derived from this class.</span>\n" +
" ├── StopIteration <span class='hljs-comment'># Raised by next() when run on an empty iterator.</span>\n" +
" ├── ArithmeticError <span class='hljs-comment'># Base class for arithmetic errors.</span>\n" +
" │ └── ZeroDivisionError <span class='hljs-comment'># Raised when dividing by zero.</span>\n" +
" ├── AttributeError <span class='hljs-comment'># Raised when an attribute is missing.</span>\n" +
@ -181,6 +180,7 @@ const DIAGRAM_8_B =
" │ └── FileNotFoundError <span class='hljs-comment'># When a file or directory is requested but doesn't exist.</span>\n" +
" ├── RuntimeError <span class='hljs-comment'># Raised by errors that don't fall in other categories.</span>\n" +
" │ └── RecursionError <span class='hljs-comment'># Raised when the maximum recursion depth is exceeded.</span>\n" +
" ├── StopIteration <span class='hljs-comment'># Raised by next() when run on an empty iterator.</span>\n" +
" ├── TypeError <span class='hljs-comment'># Raised when an argument is of wrong type.</span>\n" +
" └── ValueError <span class='hljs-comment'># When an argument is of right type but inappropriate value.</span>\n" +
" └── UnicodeError <span class='hljs-comment'># Raised when encoding/decoding strings from/to bytes fails.</span>\n";

Loading…
Cancel
Save