* **Objects can be made sortable with `'order=True'` and immutable with `'frozen=True'`.**
* **For object to be hashable, all attributes must be [hashable](#hashable) and frozen must be True.**
* **For object to be hashable, all attributes must be hashable and 'frozen' must be True.**
* **Function field() is needed because `'<attr_name>: list = []'` would make a list that is shared among all instances. Its 'default_factory' argument can be any [callable](#callable).**
* **For attributes of arbitrary type use `'typing.Any'`.**
@ -2475,7 +2475,7 @@ Scraping
#### Scrapes Python's URL, version number and logo from its Wikipedia page:
@ -886,7 +886,7 @@ Z = dataclasses.make_dataclass(<span class="hljs-string">'Z'</span>, [<span clas
<ul>
<li><strong>Objects can be made sortable with <codeclass="python hljs"><spanclass="hljs-string">'order=True'</span></code> and immutable with <codeclass="python hljs"><spanclass="hljs-string">'frozen=True'</span></code>.</strong></li>
<li><strong>For object to be hashable, all attributes must be <ahref="#hashable">hashable</a> and frozen must be True.</strong></li>
<li><strong>For object to be hashable, all attributes must be hashable and 'frozen' must be True.</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. Its 'default_factory' argument can be any <ahref="#callable">callable</a>.</strong></li>
<li><strong>For attributes of arbitrary type use <codeclass="python hljs"><spanclass="hljs-string">'typing.Any'</span></code>.</strong></li>
<li><strong><codeclass="python hljs"><spanclass="hljs-string">'<str>'</span></code> - Max age as a string: <codeclass="python hljs"><spanclass="hljs-string">'1 week, 3 days'</span></code>, <codeclass="python hljs"><spanclass="hljs-string">'2 months'</span></code>, …</strong></li>
</ul>
<div><h2id="scraping"><ahref="#scraping"name="scraping">#</a>Scraping</h2><div><h4id="scrapespythonsurlversionnumberandlogofromitswikipediapage">Scrapes Python's URL, version number and logo from its Wikipedia page:</h4><pre><codeclass="python language-python hljs"><spanclass="hljs-comment"># $ pip3 install requests beautifulsoup4</span>
'<strong>Module <a href="#operator">operator</a> provides functions itemgetter() and mul() that offer the same functionality as <a href="#lambda">lambda</a> expressions above.</strong>':'<strong>Module \'operator\' (p. 31) provides functions itemgetter() and mul() that offer the same functionality as lambda expressions (p. 11) above.</strong>',
'<strong>Adding <code class="python hljs"><span class="hljs-string">\'!r\'</span></code> before the colon converts object to string by calling its <a href="#class">repr()</a> method.</strong>':'<strong>Adding <code class="python hljs"><span class="hljs-string">\'!r\'</span></code> before the colon converts object to string by calling its repr() method (p. 14).</strong>',
'<strong>It can be any <a href="#callable">callable</a>, but is usually implemented as a function that returns a <a href="#closure">closure</a>.</strong>':'<strong>It can be any callable (p. 17), but is usually implemented as a function that returns a closure (p. 12).</strong>',
'<strong>For object to be hashable, all attributes must be <a href="#hashable">hashable</a> and frozen must be True.</strong>':'<strong>For object to be hashable, all attributes must be hashable (p. 16) and frozen must be True.</strong>',
'<strong>Function field() is needed because <code class="python hljs"><span class="hljs-string">\'<attr_name>: list = []\'</span></code> would make a list that is shared among all instances. Its \'default_factory\' argument can be any <a href="#callable">callable</a>.</strong>':'<strong>Function field() is needed because <code class="python hljs"><span class="hljs-string">\'<attr_name>: list = []\'</span></code> would make a list that is shared among all instances. Its \'default_factory\' argument can be any callable (p. 17).</strong>',
'<strong>Sequence iterators returned by the <a href="#iterator">iter()</a> function, such as list_iterator and set_iterator.</strong>':'<strong>Sequence iterators returned by the iter() function, such as list_iterator and set_iterator (p. 3).</strong>',
'<strong>Objects returned by the <a href="#itertools">itertools</a> module, such as count, repeat and cycle.</strong>':'<strong>Objects returned by the itertools module, such as count, repeat and cycle (p. 3).</strong>',