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/077777.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 22:26:04 CET 2008
On 18-Mar-08, at 5:10 PM, Guido van Rossum wrote:
> On Tue, Mar 18, 2008 at 3:54 PM, David Wolever  
> <wolever at cs.toronto.edu> wrote:
>>>>> 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
> Doesn't strike me as a terrible problem.
Excellent, I'll go ahead and do the same thing with filter and zip.

> Why is the latter == failing? What's the different between
> type(map(...)) and map?
Because future_builtins.map imports and returns itertools.imap:
def map(*args):
	from itertools import imap	
	return imap(*args)


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