From 2f715ced5e53774c0d53247d558c5b6abc312214 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Wed, 21 Oct 2020 20:45:45 +0200 Subject: [PATCH] Exceptions --- README.md | 2 +- index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9fa21f3..e2e2d3f 100644 --- a/README.md +++ b/README.md @@ -1374,7 +1374,7 @@ except (, [...]) as : ``` * **Also catches subclasses of the exception.** * **Use `'traceback.print_exc()'` to print the error message to stderr.** -* **Use `'print(, file=sys.stderr)'` to print just the cause of the exception.** +* **Use `'print()'` to print just the cause of the exception (its arguments).** ### Raising Exceptions ```python diff --git a/index.html b/index.html index fe559b4..d050fc5 100644 --- a/index.html +++ b/index.html @@ -1311,7 +1311,7 @@ LogicOp = Enum('LogicOp', {'traceback.print_exc()' to print the error message to stderr. -
  • Use 'print(<name>, file=sys.stderr)' to print just the cause of the exception.
  • +
  • Use 'print(<name>)' to print just the cause of the exception (its arguments).
  • Raising Exceptions

    raise <exception>
     raise <exception>()