-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Open
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dirinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)pendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is provided
Description
Bug report
Bug description:
{}.pop([])Raises a KeyError, not a TypeError as I would expect.
However
{1: 2}.pop([])Raises TypeError: cannot use 'list' as a dict key (unhashable type: 'list') as you'd expected.
This isn't new, it's been around since at least 3.8. Is it really intended? If so, it should be documented.
CPython versions tested on:
3.14
Operating systems tested on:
macOS
yihong0618, amirsoroush, johnslavik and mpkocher
Metadata
Metadata
Assignees
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dirinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)pendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is provided
Projects
Status
Todo