[issue2427] 2to3 should translate itertools.imap into generator expression, not list comprehension

2008-03-19 Thread Bruce Frederiksen

New submission from Bruce Frederiksen [EMAIL PROTECTED]:

2to3, svn rev 61623 translates itertools.imap(lambda x: ..., ...) into a
list comprehension.  This should be translated instead into a generator
expression so that doing itertools.imap on infinite iterators still works.

--
assignee: collinwinter
components: 2to3 (2.x to 3.0 conversion tool)
messages: 64092
nosy: collinwinter, dangyogi
severity: normal
status: open
title: 2to3 should translate itertools.imap into generator expression, not list 
comprehension
type: behavior
versions: Python 2.6

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2427
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2427] 2to3 should translate itertools.imap into generator expression, not list comprehension

2008-03-19 Thread Raymond Hettinger

Raymond Hettinger [EMAIL PROTECTED] added the comment:

Why isn't itertools.imap() being translated directly to builtins.map()?

--
nosy: +rhettinger

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2427
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2427] 2to3 should translate itertools.imap into generator expression, not list comprehension

2008-03-19 Thread David Wolever

David Wolever [EMAIL PROTECTED] added the comment:

itertools.imap is being translated directly to map... But I bet this is 
another one of those ordering problems -- itertools.imap is converted to 
the map, then the map is converted to list(map(...)) because fix_map 
doesn't know that map was already fixed.

--
assignee: collinwinter - David Wolever
nosy: +David Wolever

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2427
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2427] 2to3 should translate itertools.imap into generator expression, not list comprehension

2008-03-19 Thread David Wolever

David Wolever [EMAIL PROTECTED] added the comment:

Ok, I've added explicit ordering to fixers in r61654, fixing this issue.

--
status: open - closed

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2427
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com