From 0de00c700b499f1d624af46ca69cc6d13d9e61c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Sat, 6 Jan 2024 16:03:23 +0100 Subject: [PATCH] Datetime, Exceptions --- README.md | 6 +++--- index.html | 10 +++++----- parse.js | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index eb03d1d..e3e582e 100644 --- a/README.md +++ b/README.md @@ -659,7 +659,7 @@ from dateutil.tz import tzlocal, gettz = - # Ignores time jumps if they share tzinfo object. = ± # Returned datetime can fall into missing hour. = * # Also: = abs() and = ±% . - = / # How many weeks/years there are in TD. Also //. + = / # How many hours/weeks/years are in TD. Also //. ``` @@ -1459,7 +1459,7 @@ BaseException +-- OSError # Errors such as FileExistsError/PermissionError (see #Open). | +-- ConnectionError # Errors such as BrokenPipeError/ConnectionAbortedError. +-- RuntimeError # Raised by errors that don't fall into other categories. - | +-- NotImplementedErr # Can be raised by abstract methods or by unfinished code. + | +-- NotImplementedEr… # Can be raised by abstract methods or by unfinished code. | +-- 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 the wrong type. @@ -1482,7 +1482,7 @@ BaseException ```python raise TypeError('Argument is of the wrong type!') raise ValueError('Argument has the right type but an inappropriate value!') -raise RuntimeError('None of above!') +raise RuntimeError('I am too lazy to define my own exception!') ``` ### User-defined Exceptions diff --git a/index.html b/index.html index 7d8e0f6..d53c2c6 100644 --- a/index.html +++ b/index.html @@ -54,7 +54,7 @@
- +
@@ -580,7 +580,7 @@ Point(x=1, y=2 <TD> = <DTa> - <DTa> # Ignores time jumps if they share tzinfo object. <D/DT> = <D/DT> ± <TD> # Returned datetime can fall into missing hour. <TD> = <TD> * <float> # Also: <TD> = abs(<TD>) and <TD> = <TD> ±% <TD>. -<float> = <TD> / <TD> # How many weeks/years there are in TD. Also //. +<float> = <TD> / <TD> # How many hours/weeks/years are in TD. Also //.

#Arguments

Inside Function Call

func(<positional_args>)                           # func(0, 0)
@@ -1244,7 +1244,7 @@ error_msg = ''.join(traceback.format_exception(
       ├── OSError                 # Errors such as FileExistsError/PermissionError (see #Open).
       │    └── ConnectionError    # Errors such as BrokenPipeError/ConnectionAbortedError.
       ├── RuntimeError            # Raised by errors that don't fall into other categories.
-      │    ├── NotImplementedErr  # Can be raised by abstract methods or by unfinished code.
+      │    ├── NotImplementedEr…  # Can be raised by abstract methods or by unfinished code.
       │    └── 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 the wrong type.
@@ -1263,7 +1263,7 @@ error_msg = ''.join(traceback.format_exception(
 
 

Useful built-in exceptions:

raise TypeError('Argument is of the wrong type!')
 raise ValueError('Argument has the right type but an inappropriate value!')
-raise RuntimeError('None of above!')
+raise RuntimeError('I am too lazy to define my own exception!')
 

User-defined Exceptions

class MyError(Exception): pass
@@ -2933,7 +2933,7 @@ $ deactivate                  # Deactivates the activ
  
 
   
 
diff --git a/parse.js b/parse.js
index c68f636..936d9de 100755
--- a/parse.js
+++ b/parse.js
@@ -442,7 +442,7 @@ const DIAGRAM_7_B =
   "      ├── OSError                 # Errors such as FileExistsError/PermissionError (see #Open).\n" +
   "      │    └── ConnectionError    # Errors such as BrokenPipeError/ConnectionAbortedError.\n" +
   "      ├── RuntimeError            # Raised by errors that don't fall into other categories.\n" +
-  "      │    ├── NotImplementedErr  # Can be raised by abstract methods or by unfinished code.\n" +
+  "      │    ├── NotImplementedEr…  # Can be raised by abstract methods or by unfinished code.\n" +
   "      │    └── RecursionError     # Raised when the maximum recursion depth is exceeded.\n" +
   "      ├── StopIteration           # Raised by next() when run on an empty iterator.\n" +
   "      ├── TypeError               # Raised when an argument is of the wrong type.\n" +