On 3/28/06, Ian Bicking <[EMAIL PROTECTED]> wrote:
> Guido van Rossum wrote:
> > The proposed syntax doesn't quite jive with my guts, and the issue of
> > "what to do if they are of unequal length" is a good one, which is
> > better solved by being explicit and using zip (== izip).
>
> Is zip() going to be equivalent to izip(), or will it be a view?  I vote
> for view.  xrange() does not produce an iterator, so there is some
> precedence that we not replace list-constructing-builtins with
> iterator-constructing-builtins.

I believe it should be an interator (i.e. izip()). I think we should
be careful with making everything a view, especially if the *input*
can be an arbitrary iterator. filter(), map(), zip(), enumerate() all
make perfect sense with an iterator as input, and I don't want to
think about the consequences of allowing views on iterators.

I think views should only be used when the view invariants can be
easily sustained by the underlying data type. A dict can be taught
about its views and has complete control because you get the views by
calling a method. That's not the case for zip().

--
--Guido van Rossum (home page: http://www.python.org/~guido/)
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to