[Python-ideas] Generators are iterators
random832 at fastmail.us
random832 at fastmail.us
Wed Dec 10 20:14:21 CET 2014
More information about the Python-ideas mailing list
Wed Dec 10 20:14:21 CET 2014
- Previous message: [Python-ideas] Generators are iterators
- Next message: [Python-ideas] [Python-Dev] Python 2.x and 3.x use survey, 2014 edition
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, Dec 10, 2014, at 07:36, Oscar Benjamin wrote: > Many iterators perform other kinds of exception handling without > allowing that to fall through and many iterators catch StopIteration > from child iterators without reraising it. This has never lead anyone > to suggest that such iterators are not true iterators in any way. The problem isn't what they do when the child iterator raises StopIteration. That's always been well-defined as "treat that particular child iterator as having ended" and behave however the function wants to treat that case (e.g. chain moves on to the next argument). The question is what they should do when *one of their other inputs* (such as a map or filter function) raises StopIteration.
- Previous message: [Python-ideas] Generators are iterators
- Next message: [Python-ideas] [Python-Dev] Python 2.x and 3.x use survey, 2014 edition
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-ideas mailing list