New submission from Jonathan Kotta:

enumerate() is a "consuming_call", as defined in, 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, 
type: behavior
Added file:

Python tracker <>
Python-bugs-list mailing list

Reply via email to