diff --git a/README.md b/README.md index 3ce5a31..6d4448b 100644 --- a/README.md +++ b/README.md @@ -416,6 +416,7 @@ Format ``` * **Options can be generated dynamically: `f'{:{}[…]}'`.** * **Adding `'!r'` before the colon converts object to string by calling its [repr()](#class) method.** +* **Adding `'='` before the colon prepends the expression to the result.** ### Strings ```python @@ -1393,6 +1394,7 @@ finally: * **Code inside the `'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).** * **All variables that are initialized in executed blocks are also visible in all subsequent blocks, as well as outside the try/except clause (only function blocks delimit scope).** +* **To catch signals use `'signal.signal(signal_number, )'` instead.** ### Catching Exceptions ```python diff --git a/index.html b/index.html index 8e58050..8255ca2 100644 --- a/index.html +++ b/index.html @@ -54,7 +54,7 @@
- +
@@ -387,6 +387,7 @@ Point(x=1, y=2
  • Options can be generated dynamically: f'{<el>:{<str/int>}[…]}'.
  • Adding '!r' before the colon converts object to string by calling its repr() method.
  • +
  • Adding '=' before the colon prepends the expression to the result.

Strings

{'abcde':10}                             # 'abcde     '
 {'abcde':10.3}                           # 'abc       '
@@ -1195,6 +1196,7 @@ 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).
  • All variables that are initialized in executed blocks are also visible in all subsequent blocks, as well as outside the try/except clause (only function blocks delimit scope).
  • +
  • To catch signals use 'signal.signal(signal_number, <func>)' instead.
  • Catching Exceptions

    except <exception>: ...
     except <exception> as <name>: ...
    @@ -2909,7 +2911,7 @@ $ pyinstaller script.py --add-data '<path>:.'