From a9b70faffa08be8fb768ffa543ccfe4bbe3d11c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Sun, 26 Jun 2022 07:34:54 +0200 Subject: [PATCH] Exceptions, Cython --- README.md | 10 +++++----- index.html | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 9250cac..09defac 100644 --- a/README.md +++ b/README.md @@ -1398,10 +1398,10 @@ finally: ### Catching Exceptions ```python -except : ... -except as : ... -except (, [...]): ... -except (, [...]) as : ... +except : +except as : +except (, [...]): +except (, [...]) as : ``` * **Also catches subclasses of the exception.** * **Use `'traceback.print_exc()'` to print the error message to stderr.** @@ -3498,7 +3498,7 @@ import ```python cdef = cdef [n_elements] = [, , ...] -cdef ( , ...): … +cdef ( ): ... ``` ```python diff --git a/index.html b/index.html index 694e245..cf85c03 100644 --- a/index.html +++ b/index.html @@ -1200,10 +1200,10 @@ LogicOp = Enum('LogicOp', {'else' block will only be executed if 'try' block had no exceptions.
  • Code inside the 'finally' block will always be executed (unless a signal is received).
  • -

    Catching Exceptions

    except <exception>: ...
    -except <exception> as <name>: ...
    -except (<exception>, [...]): ...
    -except (<exception>, [...]) as <name>: ...
    +

    Catching Exceptions

    except <exception>:
    +except <exception> as <name>:
    +except (<exception>, [...]):
    +except (<exception>, [...]) as <name>:
     
      @@ -2844,7 +2844,7 @@ print(f'Hello {values[Script needs to be saved with a 'pyx' extension.
    cdef <ctype> <var_name> = <el>
     cdef <ctype>[n_elements] <var_name> = [<el_1>, <el_2>, ...]
    -cdef <ctype/void> <func_name>(<ctype> <arg_name_1>, ...): …
    +cdef <ctype/void> <func_name>(<ctype> <arg_name>): ...