results = executor.map(lambda x, y: x + y, 'abc', '123') # ('a1', 'b2', 'c3')
```
* **CPython interpreter can only run a single thread at the time. That is why this map() won't be faster than the standard map() unless passed function contains an I/O operation.**
* **CPython interpreter can only run a single thread at the time. That is why this map() won't be faster than the standard map(), unless passed function contains an I/O operation.**
@ -988,7 +988,7 @@ Z = dataclasses.make_dataclass(<span class="hljs-string">'Z'</span>, [<span clas
<ul>
<li><strong>An object can be made sortable with <codeclass="python hljs"><spanclass="hljs-string">'order=True'</span></code> or immutable with <codeclass="python hljs"><spanclass="hljs-string">'frozen=True'</span></code>.</strong></li>
<li><strong>Function field() is needed because <codeclass="python hljs"><spanclass="hljs-string">'<attr_name>: list = []'</span></code> would make a list that is shared among all instances.</strong></li>
<li><strong>Default_factory can be any callable.</strong></li>
<li><strong>Default_factory can be any <ahref="#callable">callable</a>.</strong></li>
</ul>
<div><h3id="slots">Slots</h3><p><strong>Mechanism that restricts objects to attributes listed in 'slots' and significantly reduces their memory footprint.</strong></p><pre><codeclass="python language-python hljs"><spanclass="hljs-class"><spanclass="hljs-keyword">class</span><spanclass="hljs-title">MyClassWithSlots</span>:</span>
__slots__ = [<spanclass="hljs-string">'a'</span>]
@ -1074,7 +1074,10 @@ Z = dataclasses.make_dataclass(<span class="hljs-string">'Z'</span>, [<span clas
<li><strong>All functions and classes have a call() method, hence are callable.</strong></li>
<li><strong>When this cheatsheet uses <codeclass="python hljs"><spanclass="hljs-string">'<function>'</span></code> in an argument, it actually means <codeclass="python hljs"><spanclass="hljs-string">'<callable>'</span></code>.</strong></li>
<li><strong>CPython interpreter can only run a single thread at the time. That is why this map() won't be faster than the standard map() unless passed function contains an I/O operation.</strong></li>
<li><strong>CPython interpreter can only run a single thread at the time. That is why this map() won't be faster than the standard map(), unless passed function contains an I/O operation.</strong></li>