Good to known (and I had heard this via Python community channels
already). Still feels wrong, given "name polymorphism" on `map`. Perhaps
we just plow ahead.
Still seems like someone (at some layer) will want iter.clone(). Vouch?
/be
Jason Orendorff wrote:
OnMon, Oct 6, 2014 at 1:34 PM, Domenic Denicola
<[email protected]> wrote:
> This is iterables vs. iterators IMO. Iterators are inherently stateful and I'd expect
anything that uses them to consume them, even something named "map". Iterables of
course would not be.
I agree. It's inherent in the python-like design we're using for iteration.
It is not so jarring in practice, even for people with the classical
training to recognize what a farce it is.:) Many uses of itertools in
python, though blatantly stateful in implementation and operation,
still "feel" functional, because the iterator being consumed is a
temporary, something like mydict.iterkeys(). The mutation isn't
observable if there's no other reference to the iterator object.
-j
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss