Did zip ever used to fail with 0 arguments?
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Fri Jun 22 12:26:57 EDT 2018
On Fri, 22 Jun 2018 11:49:15 -0400, Michael Lamparski wrote:
>>>> 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
No, you are correct, but you have to go all the way back to Python 2.3 to
see that behaviour:
https://docs.python.org/2/library/functions.html#zip
New in version 2.0.
Changed in version 2.4: Formerly, zip() required at least one argument
and zip() raised a TypeError instead of returning an empty list.
--
Steven D'Aprano
"Ever since I learned about confirmation bias, I've been seeing
it everywhere." -- Jon Ronson
More information about the Python-list
mailing list