On 18-Mar-08, at 5:10 PM, Guido van Rossum wrote:
> On Tue, Mar 18, 2008 at 3:54 PM, David Wolever
> <[EMAIL PROTECTED]> 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)
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com