with open(filename, 'w', encoding='utf-8', newline='') as file:
writer = csv.writer(file, dialect)
writer = csv.writer(file, dialect, **params)
writer.writerows(rows)
```
@ -2155,7 +2155,7 @@ with <lock>: # Enters the block by calling acq
```
* **Map() and as_completed() also accept 'timeout' argument that causes TimeoutError if result isn't available in 'timeout' seconds after next() is called.**
* **Exceptions that happen inside threads are raised when next() is called on map's iterator or when result() is called on a Future. Its exception() method returns exception or None.**
* **An object with the same interface called ProcessPoolExecutor provides true parallelism by running a separate interpreter in each process. Arguments/results must be [pickable](#pickle).**
* **ProcessPoolExecutor provides true parallelism, but everything sent to/from workers must be [pickable](#pickle). Queues must be sent using executor's 'initargs' and 'initializer' parameters.**
Operator
@ -2423,17 +2423,17 @@ Curses
------
#### Runs a basic file explorer in the terminal:
```python
import curses, curses.ascii, os
import curses, os
from curses import A_REVERSE, KEY_DOWN, KEY_UP, KEY_LEFT, KEY_RIGHT, KEY_ENTER
<li><strong>Map() and as_completed() also accept 'timeout' argument that causes TimeoutError if result isn't available in 'timeout' seconds after next() is called.</strong></li>
<li><strong>Exceptions that happen inside threads are raised when next() is called on map's iterator or when result() is called on a Future. Its exception() method returns exception or None.</strong></li>
<li><strong>An object with the same interface called ProcessPoolExecutor provides true parallelism by running a separate interpreter in each process. Arguments/results must be <ahref="#pickle">pickable</a>.</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.</strong></li>
</ul>
<div><h2id="operator"><ahref="#operator"name="operator">#</a>Operator</h2><p><strong>Module of functions that provide the functionality of operators.</strong></p><pre><codeclass="python language-python hljs"><spanclass="hljs-keyword">import</span> operator <spanclass="hljs-keyword">as</span> op
<div><h2id="curses"><ahref="#curses"name="curses">#</a>Curses</h2><div><h4id="runsabasicfileexplorerintheterminal">Runs a basic file explorer in the terminal:</h4><pre><codeclass="python language-python hljs"><spanclass="hljs-keyword">import</span> curses, curses.ascii, os
<div><h2id="curses"><ahref="#curses"name="curses">#</a>Curses</h2><div><h4id="runsabasicfileexplorerintheterminal">Runs a basic file explorer in the terminal:</h4><pre><codeclass="python language-python hljs"><spanclass="hljs-keyword">import</span> curses, os