This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kj
Recipients gvanrossum, kj
Date 2021-02-13.04:41:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Hi Guido, after a month of observing how people stumbled over the related bugs, and experience from implementing this PEP, I learnt a few things which I think may interest you:

Previously it was *recommended* that everything in typing be hashable. I would now say it is *required*. Union uses sets to de-duplicate arguments, and Optional uses Union internally. Both blow up if things aren't hashable. A surprising number of people caught the bug because Optional[Callable[.....]] failed.

Going forward, future PEPs to probably need to ensure their implementations are hashable, or risk not working with some of the types in the module itself. Alternatively, they can always change the implementations of Union and Optional, though I don't know if I recommend that ;).

Thanks for your time.
Date User Action Args
2021-02-13 04:41:43kjsetrecipients: + kj, gvanrossum
2021-02-13 04:41:43kjsetmessageid: <>
2021-02-13 04:41:43kjlinkissue41559 messages
2021-02-13 04:41:43kjcreate