Georg Brandl wrote: > Sure, you could use ``iter(())`` or ``iter([])``, but for consistency's sake > wouldn't it make sense for ``iter()`` to return an empty iterator, as > ``str()`` > returns an empty string etc.?
I had no idea that "str()" or "int()" would do that. "file()" certainly doesn't! :) I don't really think there's much reason to make "iter()" work. As you say, "iter([])" works just fine. For those rare times you want an empty iterator, I don't think the two extra characters is much of a price to pay. -Andrew. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com