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

2014-05-29 Thread Sasha Ovsankin
New submission from Sasha Ovsankin: Python 3.4.0 (default, May 20 2014, 20:42:24) [GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin Type help, copyright, credits or license for more information. zip([1, 2, 3], [a, b, c]) zip object at 0x1017c79c8 Python 2.7.5 (default, Mar 9

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

2014-05-29 Thread SilentGhost
SilentGhost added the comment: This is the correct behaviour. In python 3 zip returns an iterator. Detailed information is available in documentation. https://docs.python.org/3/library/functions.html#zip -- nosy: +SilentGhost resolution: - not a bug status: open - closed

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

2014-05-29 Thread Eric Snow
Eric Snow added the comment: It may be the correct behavior but that doesn't mean we cannot update the repr to be more informative. We've already done that for a number of types that previously used the default __repr__() implementation. So in the case, how hard would it be to have the

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

2014-05-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: zip(list_iterator object at 0xb70c7c8c, list_iterator object at 0xb70c7cac) doesn't look more readable to me. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21607

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

2014-05-29 Thread Sasha Ovsankin
Sasha Ovsankin added the comment: It's also showing up in iPython. list(...) is a reasonable workaround but I disagree with the not a bug opinion. This is definitely the regression vs Python 2. Who else can I talk to about reopening this? -- ___

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

2014-05-29 Thread Eric Snow
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

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

2014-05-29 Thread Mark Lawrence
Mark Lawrence added the comment: How do you display the contents of an iterable without using them up, or have I grossly overlooked something? -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21607

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

2014-05-29 Thread Sasha Ovsankin
Sasha Ovsankin 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? -- ___ Python tracker rep...@bugs.python.org

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

2014-05-29 Thread SilentGhost
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

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

2014-05-29 Thread Sasha Ovsankin
Sasha Ovsankin added the comment: Yep, you are right. Even the zip thingy is not reusable. Oh well... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21607 ___