You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: index.html
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1008,7 +1008,8 @@
1008
1008
1009
1009
1010
1010
<ul>
1011
-
<li><strong>Objects can be made sortable with <codeclass="python hljs"><spanclass="hljs-string">'order=True'</span></code> and/or immutable and hashable with <codeclass="python hljs"><spanclass="hljs-string">'frozen=True'</span></code>.</strong></li>
1011
+
<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>
1012
+
<li><strong>For object to be hashable, all attributes must be hashable and frozen must be True.</strong></li>
1012
1013
<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>
1013
1014
<li><strong>Default_factory can be any <ahref="#callable">callable</a>.</strong></li>
0 commit comments