evhub/coconut

Empty `zip` objects error on `__len__`

Closed this issue · 2 comments

Getting the length of an empty zip object (e.g. len(zip())) raises

ValueError: min() iterable argument is empty

since the length is computed as the minimum length among the iterators, but no default value is set.

I have faced a similar issue as well

Fixed as of coconut-develop>=3.1.0-post_dev3 (pip uninstall coconut && pip install -U coconut-develop>=3.1.0-post_dev3). Also universalizes default= argument for min and max built-ins.