Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #104164

RE: reversed(zip(...)) not working as intended

From Albert-Jan Roskam <sjeik_appie@hotmail.com>
Newsgroups comp.lang.python
Subject RE: reversed(zip(...)) not working as intended
Date 2016-03-06 18:46 +0000
Message-ID <mailman.262.1457290036.20602.python-list@python.org> (permalink)
References <56DC7727.1090001@mail.de>

Show all headers | View raw


(Sorry for top-posting)

 No TypeError here:

Python 2.7.2 (default, Nov  2 2015, 01:07:37) [GCC 4.9 20140827 (prerelease)] on linux4
Type "help", "copyright", "credits" or "license" for more information.
>>> ten = range(10)
>>> reversed(zip(ten, ten))
<listreverseiterator object at 0xb6c0d310>
>>> list(reversed(zip(ten, ten)))
[(9, 9), (8, 8), (7, 7), (6, 6), (5, 5), (4, 4), (3, 3), (2, 2), (1, 1), (0, 0)]
>>>

> To: python-list@python.org
> From: srkunze@mail.de
> Subject: reversed(zip(...)) not working as intended
> Date: Sun, 6 Mar 2016 19:29:59 +0100
> 
> Hi,
> 
> what's the reason that reversed(zip(...)) raises as a TypeError?
> 
> Would allowing reversed to handle zip and related functions lead to 
> strange errors?
> 
> Best,
> Sven
> -- 
> https://mail.python.org/mailman/listinfo/python-list
 		 	   		  

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

RE: reversed(zip(...)) not working as intended Albert-Jan Roskam <sjeik_appie@hotmail.com> - 2016-03-06 18:46 +0000

csiph-web