On Wed, Apr 16, 2008 at 3:15 AM, Armin Rigo <[EMAIL PROTECTED]> wrote: > What about the less confusing and more readily generalizable: > > <range object 0, 1, ..., 9> > > It would also be helpful IMHO to use this kind of repr for most built-in > iterators and iterables, instead of their mosty-useless default repr.
We can't do this for iterators, since you can't print the values without consuming the iterator. Printing something shouldn't have a side effect on it. But for iterables (e.g. dict views) it should work fine, and if others can agree with this I'd be happy to accept patches. -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com