* **Bitwise operators require objects to have or(), xor(), and(), lshift(), rshift() and invert() special methods, unlike logical operators that work on all types of objects.**
* **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().**
Match Statement
@ -2336,7 +2336,7 @@ import asyncio as aio
#### Runs a terminal game where you control an asterisk that must avoid numbers:
```python
import asyncio, collections, curses, curses.textpad, enum, random, time
import asyncio, collections, curses, curses.textpad, enum, random
<div><h2id="operator"><ahref="#operator"name="operator">#</a>Operator</h2><p><strong>Module of functions that provide the functionality of operators. Functions are ordered by operator precedence, starting with least binding.</strong></p><pre><codeclass="python language-python hljs"><spanclass="hljs-keyword">import</span> operator <spanclass="hljs-keyword">as</span> op
<bool> = op.not_(<obj>) <spanclass="hljs-comment"># or, and, not (or/and missing)</span>
<li><strong>Bitwise operators require objects to have or(), xor(), and(), lshift(), rshift() and invert() special methods, unlike logical operators that work on all types of objects.</strong></li>
<li><strong>Comparisons can be chained: <codeclass="python hljs"><spanclass="hljs-string">'x < y < z'</span></code> is the same as <codeclass="python hljs"><spanclass="hljs-string">'(x < y) and (y < z)</span></code>'.</strong></li>
<li><strong>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().</strong></li>
</ul>
<div><h2id="matchstatement"><ahref="#matchstatement"name="matchstatement">#</a>Match Statement</h2><p><strong>Executes the first block with matching pattern. Added in Python 3.10.</strong></p><pre><codeclass="python language-python hljs"><spanclass="hljs-keyword">match</span><object/expression>:
<iter> = aio.as_completed(<coros/tasks>) <spanclass="hljs-comment"># Iter of coros. All return next result when awaited.</span>
</code></pre>
<div><h4id="runsaterminalgamewhereyoucontrolanasteriskthatmustavoidnumbers">Runs a terminal game where you control an asterisk that must avoid numbers:</h4><pre><codeclass="python language-python hljs"><spanclass="hljs-keyword">import</span> asyncio, collections, curses, curses.textpad, enum, random, time
<div><h4id="runsaterminalgamewhereyoucontrolanasteriskthatmustavoidnumbers">Runs a terminal game where you control an asterisk that must avoid numbers:</h4><pre><codeclass="python language-python hljs"><spanclass="hljs-keyword">import</span> asyncio, collections, curses, curses.textpad, enum, random
P = collections.namedtuple(<spanclass="hljs-string">'P'</span>, <spanclass="hljs-string">'x y'</span>) <spanclass="hljs-comment"># Position</span>
D = enum.Enum(<spanclass="hljs-string">'D'</span>, <spanclass="hljs-string">'n e s w'</span>) <spanclass="hljs-comment"># Direction</span>