[Python-Dev] make iter() return an empty iterator?

Facundo Batista facundobatista at gmail.com
Fri Aug 3 15:01:47 CEST 2007

2007/8/3, Andrew Bennetts <andrew-pythondev at puzzling.org>:

> I don't really think there's much reason to make "iter()" work.  As you say,

What bad thing could happen if we make iter() work? If nothing, we
should ask ourselves: which is the more intuitive behaviour to expect
of iter()? To raise an exception or to return an empty iterator?

I'm +0 for the latter.

.    Facundo

Blog: http://www.taniquetil.com.ar/plog/
PyAr: http://www.python.org/ar/

More information about the Python-Dev mailing list