diff --git a/README.md b/README.md index e674cb5..32a7f16 100644 --- a/README.md +++ b/README.md @@ -2183,8 +2183,8 @@ sorted_by_both = sorted(, key=op.itemgetter(1, 0)) product_of_elems = functools.reduce(op.mul, ) first_element = op.methodcaller('pop', 0)() ``` -* **Comparisons can be chained: `'x < y < z'` is the same as `'(x < y) and (y < z)`'.** * **Most operators call the object's special method that is named after them (second object is passed as an argument), while logical operators call their own code that relies on bool().** +* **Comparisons can be chained: `'x < y < z'` is the same as `'(x < y) and (y < z)`'.** Match Statement diff --git a/index.html b/index.html index ca984d2..6631a50 100644 --- a/index.html +++ b/index.html @@ -1794,8 +1794,8 @@ product_of_elems = functools.reduce(op.mul, <collection>) first_element = op.methodcaller('pop', 0)(<list>)
    -
  • Comparisons can be chained: 'x < y < z' is the same as '(x < y) and (y < z)'.
  • Most operators call the object's special method that is named after them (second object is passed as an argument), while logical operators call their own code that relies on bool().
  • +
  • Comparisons can be chained: 'x < y < z' is the same as '(x < y) and (y < z)'.

#Match Statement

Executes the first block with matching pattern. Added in Python 3.10.

match <object/expression>:
     case <pattern> [if <condition>]: