[Python-Dev] PEP 3000 and iterators

Lisandro Dalcin dalcinl at gmail.com
Sat Sep 10 00:15:01 CEST 2005

PEP 3000 says
(http://www.python.org/peps/pep-3000.html) :

Core language
- Return iterators instead of lists where appropriate for atomic type
methods (e.g. dict.keys(), dict.values(), dict.items(), etc.)

Built-in Namespace
- Make built-ins return an iterator where appropriate (e.g. range(),
zip(), etc.)
- Relevant functions should consume iterators (e.g. min(), max())
To be removed:
- xrange(): use range() instead [1]

Any possibility to add one (or more) __future__ statement to
implicitly get this behavior? Any suggestion about naming?

Lisandro Dalcín
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594

More information about the Python-Dev mailing list