Possible File iteration bug

Terry Reedy tjreedy at udel.edu
Fri Jul 15 23:47:28 CEST 2011


On 7/15/2011 10:42 AM, Billy Mays wrote:
> On 07/15/2011 10:28 AM, Thomas Rachel wrote:
>> Am 15.07.2011 14:52 schrieb Billy Mays:

>>> Really what would be useful is some sort of PauseIteration Exception
>>> which doesn't close the generator when raised, but indicates to the
>>> looping header that there is no more data for now.
>>
>> a None or other sentinel value would do this as well (as ChrisA already
>> said).

> A sentinel does provide a work around, but it also passes the problem
> onto the caller rather than the callee:

No more so than a new exception that the caller has to recognize.

-- 
Terry Jan Reedy




More information about the Python-list mailing list