"Guido van Rossum" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
| 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.

Assuming we are discussing the output of str() rather that repr(),
I think we should give Armin's idea a try for iterables that don't get the 
full display
(as with lists, etc) but can harmlessly produce some values. 



_______________________________________________
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

Reply via email to