-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
Open
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dirinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
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 and johnslavik
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)
Projects
Status
Todo