Did zip ever used to fail with 0 arguments?
Michael Lamparski
diagonaldevice at gmail.com
Fri Jun 22 11:49:15 EDT 2018
>>> list(zip())
[]
I'm not sure why, but I really could've sworn this used to produce
something like:
TypeError: zip requires at least one argument
which is often what I would rather have happen since 0 arguments is a
degenerate case. (consider the result of zip(*zip(*args)) for 1+ arguments
versus 0 arguments).
I looked all through the changelog (including the HISTORY file, which I
searched all the way down to the point where zip first became an iterator),
but I don't see anything to this effect. Am I crazy?
(maybe I am confusing it with another language? But I can hardly even begin
to guess how, because Python is more or less the only dynamically-typed
language I use!)
---
Michael
More information about the Python-list
mailing list