evhub / coconut

Simple, elegant, Pythonic functional programming.
http://coconut-lang.org
Apache License 2.0
4.09k stars 125 forks source link

Document different `zip` behavior #791

Closed evhub closed 12 months ago

evhub commented 1 year ago

This code yields different results on Python vs. Coconut:

x = zip([1, 2],[3, 4])
print(list(x), list(x))

I think it's probably better to keep the current behavior here, but it should be documented.

We should also note that, unlike the above, this currently does work the same on Python and Coconut and should continue to do so:

x = zip((x for x in range(5)), (x for x in range(10)))
print(list(x), list(x))
evhub commented 1 year ago

This was already documented, but I cleaned it up a bit.