@@ -587,24 +587,27 @@ Improved error messages
587587                     ^^^^^^ 
588588   SyntaxError: cannot use subscript as import target 
589589
590- 
591-   to a :class: `dict ` or :class: `set `:
592- 
593-   (Contributed by Victor Stinner in :gh: `426449d `.)
590+ 
591+   a :class: `dict ` or :class: `set `. (Contributed by CF Bolz-Tereick and Victor Stinner
592+   in :gh: `132828 `.)
594593
595594  .. code-block :: pycon 
596595
597596     >>> s = set() 
598597     >>> s.add({'pages': 12, 'grade': 'A'}) 
599598     Traceback (most recent call last): 
600-        File "<stdin>", line 1, in <module> 
601-      TypeError: Cannot use 'dict' as a set element (unhashable type). 
599+        File "<python-input-1>", line 1, in <module> 
600+          s.add({'pages': 12, 'grade': 'A'}) 
601+          ~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
602+      TypeError: cannot use 'dict' as a set element (unhashable type: 'dict') 
602603     >>> d = {} 
603604     >>> l = [1, 2, 3] 
604605     >>> d[l] = 12 
605606     Traceback (most recent call last): 
606-        File "<stdin>", line 1, in <module> 
607-      TypeError: Cannot use 'list' as a dict key (unhashable type). 
607+        File "<python-input-4>", line 1, in <module> 
608+          d[l] = 12 
609+          ~^^^ 
610+      TypeError: cannot use 'list' as a dict key (unhashable type: 'list') 
608611
609612
610613whatsnew314-pep741 :
0 commit comments