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

SilentGhost report at bugs.python.org
Thu May 29 21:36:47 CEST 2014


SilentGhost added the comment:

>> How do you display the contents of an iterable without using them up
> In general case you can't, but zip object _is_ reusable iterable so we can reuse it?
I think you're misunderstanding what an iterator is or how it functions. Just to make it clear, it cannot be "reused". What Eric suggested, was to look at the inputs of zip and construct a representation of zip object that is more user friendly. The point that Serhiy's is making is that its usefulness is actually fairly limited.

----------

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


More information about the Python-bugs-list mailing list