@ -2168,7 +2168,7 @@ with <lock>: # Enters the block by calling acq
Operator
--------
**Module of functions that provide the functionality of operators. Functions are ordered by operator precedence, starting with least binding.**
**Module of functions that provide the functionality of operators. Functions are ordered and grouped by operator precedence from least to most binding. Logical and arithmetic operators in rows 1, 3 and 5 are also ordered by precedence within a group.**
```python
import operator as op
```
@ -2419,9 +2419,9 @@ import matplotlib.pyplot as plt
plt.plot/bar/scatter(x_data, y_data [, label=<str>]) # Also plt.plot(y_data).
plt.legend() # Adds a legend.
plt.title/xlabel/ylabel(<str>) # Adds a title or label.
plt.savefig(<path>) # Saves the figure.
plt.show() # Displays the figure.
plt.clf() # Clears the figure.
plt.savefig(<path>) # Saves the plot.
plt.show() # Displays the plot.
plt.clf() # Clears the plot.
```
@ -2876,7 +2876,7 @@ import wave
<int> = <Wave>.getnchannels() # Returns number of samples per frame.
<int> = <Wave>.getsampwidth() # Returns number of bytes per sample.
<tuple> = <Wave>.getparams() # Returns namedtuple of all parameters.
<bytes> = <Wave>.readframes(nframes) # Returns next n frames. All if -1.
<bytes> = <Wave>.readframes(nframes) # Returns next n frames (-1 returns all).
```
```python
@ -2913,7 +2913,7 @@ def read_wav_file(filename):
p = file.getparams()
frames = file.readframes(-1)
bytes_samples = (frames[i : i + p.sampwidth] for i in range(0, len(frames), p.sampwidth))
return [get_int(b) / pow(2, p.sampwidth * 8 - 1) for b in bytes_samples], p
return [get_int(b) / pow(2, (p.sampwidth * 8) - 1) for b in bytes_samples], p
<li><strong>Exceptions that happen inside threads are raised when map iterator's next() or Future's result() are called. Future's exception() method returns exception object or None.</strong></li>
<li><strong>ProcessPoolExecutor provides true parallelism but: everything sent to/from workers must be <ahref="#pickle">pickable</a>, queues must be sent using executor's 'initargs' and 'initializer' parameters, and executor should only be reachable via <codeclass="python hljs"><spanclass="hljs-string">'if __name__ == "__main__": ...'</span></code>.</strong></li>
</ul>
<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
<div><h2id="operator"><ahref="#operator"name="operator">#</a>Operator</h2><p><strong>Module of functions that provide the functionality of operators. Functions are ordered and grouped by operator precedence from least to most binding. Logical and arithmetic operators in rows 1, 3 and 5 are also ordered by precedence within a group.</strong></p><pre><codeclass="python language-python hljs"><spanclass="hljs-keyword">import</span> operator <spanclass="hljs-keyword">as</span> op
plt.plot/bar/scatter(x_data, y_data [, label=<str>]) <spanclass="hljs-comment"># Also plt.plot(y_data).</span>
plt.legend() <spanclass="hljs-comment"># Adds a legend.</span>
plt.title/xlabel/ylabel(<str>) <spanclass="hljs-comment"># Adds a title or label.</span>
plt.savefig(<path>) <spanclass="hljs-comment"># Saves the figure.</span>
plt.show() <spanclass="hljs-comment"># Displays the figure.</span>
plt.clf() <spanclass="hljs-comment"># Clears the figure.</span>
plt.savefig(<path>) <spanclass="hljs-comment"># Saves the plot.</span>
plt.show() <spanclass="hljs-comment"># Displays the plot.</span>
plt.clf() <spanclass="hljs-comment"># Clears the plot.</span>
</code></pre></div>
<div><h2id="table"><ahref="#table"name="table">#</a>Table</h2><div><h4id="printsacsvspreadsheettotheconsole">Prints a CSV spreadsheet to the console:</h4><pre><codeclass="python language-python hljs"><spanclass="hljs-comment"># $ pip3 install tabulate</span>
xxxxxxxxxx