New submission from Jonathan Kotta: enumerate() is a "consuming_call", as defined in fixer_util.py, because it takes an iterable (not necessarily a collection). Therefore whenever we have something like enumerate(zip(...)), we don't need to replace it with enumerate(list(zip(...))) in 2to3, because enumerate doesn't care that zip no longer returns a list.
Patch attached. ---------- components: 2to3 (2.x to 3.x conversion tool) files: enumerate.patch keywords: patch messages: 176590 nosy: jpkotta priority: normal severity: normal status: open title: 2to3 should treat enumerate like sorted for zip, map, filter, dict, xrange type: behavior Added file: http://bugs.python.org/file28152/enumerate.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16573> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com