[Python-Dev] PEP 340: Breaking out.
Eric Nieuwland
eric.nieuwland at xs4all.nl
Tue May 3 23:44:39 CEST 2005
Guido van Rossum wrote:
> [Skip Montanaro]
>> To the casual observer, this
>> looks like "break" should break out of the loop:
>>
>> while True:
>> block synchronized(v1):
>> ...
>> if v1.field:
>> break
>> time.sleep(1)
>
> Without 'block' this would be written as try/finally. And my point is
> that people just don't write try/finally inside a while loop very
> often (I found *no* examples in the entire standard library).
Errr... Dutch example: Dining Philosophers (Dijkstra)
--eric
More information about the Python-Dev
mailing list