[issue21607] results of `zip` are displayed as '<zip object at 0xxxxxx>

Eric Snow report at bugs.python.org
Thu May 29 19:54:08 CEST 2014


Eric Snow added the comment:

> "zip(<list_iterator object at 0xb70c7c8c>, <list_iterator object at 0xb70c7cac>)" doesn't look more readable to me.

Well, that seems more informative to me.  Now you know that you're
zipping together two list iterators.  By "readable" do you mean
shorter?  In my opinion the size of a repr is less of a concern
(though not insignificant) than the usefulness of the information the
repr contains.  The fact that some objects (like list iterators) don't
themselves have informative reprs is an issue for any object with a
custom repr that reports it's attrs/args.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21607>
_______________________________________


More information about the Python-bugs-list mailing list