A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-March/077770.html below:

[Python-Dev] map, filter, zip in future_builtins

[Python-Dev] map, filter, zip in future_builtinsDavid Wolever wolever at cs.toronto.edu
Tue Mar 18 21:54:05 CET 2008
I'm working on #2171 -- putting map, filter, zip in 2.6's  
future_builtins.
It has been suggested that it would be simplest to just return  
itertools.(imap, izip, ifilter), which is what py3k/Python/ 
bltinmodule.c, revision 61356 did.

The advantage of this is that it's really easy and the behaviour  
seems to be identical.
The disadvantage is that the two aren't identical:
 >>> type(map(lambda x: x, [1, 2, 3]))  # Python 3
<type 'map'>
 >>> type(map(lambda x: x, [1, 2, 3])) == map
True

 >>> type(map(lambda x: x, [1, 2, 3])) # Python 2.6, with the patch
<type 'itertools.imap'>
 >>> type(map(lambda x: x, [1, 2, 3])) == map
False

Recommendations?
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4