Open
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