Terry Reedy:

> 1. islice works with any iterator; generator method would only work with
> generators

A slice syntax that's syntactic sugar for islice(some_iter,1,None) may
be added to all iterators.


>2. iterator protocol is intentionally simple.<

Slice syntax is already available for lists, tuples, strings, arrays,
numpy, etc, so adding it to iterators too doesn't look like adding
that large amount of information to the mind of the programmer.

Bye,
bearophile
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to