New submission from Jelle Zijlstra <jelle.zijls...@gmail.com>:

After the changes from bpo-42345, the Literal documentation claims that 
"Literal objects will now raise a TypeError exception during equality 
comparisons if one of their parameters are not immutable." But in fact it's 
*unhashable* types that raise an error; mutable but hashable types such as 
functions or custom objects work fine.

I'll submit a PR for this but may wait until GH-25787 is resolved.

----------
assignee: Jelle Zijlstra
components: Documentation
messages: 392608
nosy: Jelle Zijlstra
priority: normal
severity: normal
status: open
title: typing.Literal: args must be hashable, not immutable
versions: Python 3.10, Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue44001>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to