Closed as not planned
Description
Bug report
Bug description:
dict("")
# {}
dict(" ")
ValueError: dictionary update sequence element #0 has length 1; 2 is required
I can see how an empty string might be intended to return an empty dict
but since " "
is raising an error about the 0th element needing a longer length it seems it isn't looking at the type of the input and an empty string works simply because its length is 0.
CPython versions tested on:
3.11
Operating systems tested on:
Linux
Metadata
Metadata
Assignees
Labels
(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)The issue will be closed if no feedback is providedA feature request or enhancement