Why is break allowed in finally, but continue is not?
Mark Lawrence
breamoreboy at yahoo.co.uk
Mon Dec 14 13:40:26 EST 2015
On 14/12/2015 17:37, Ned Batchelder wrote:
> On Sunday, December 13, 2015 at 5:28:44 PM UTC-5, Ben Finney wrote:
>> Ned Batchelder <ned at nedbatchelder.com> writes:
>>> So why treat 'continue' specially?
>>
>> I am inclined to agree, but in the opposite direction: a case should be
>> made for allowing *any* flow-control statement in an exception-handler's
>> 'finally' clause.
>
> I agree, those all seem like bad ideas. But 'continue' has been singled
> out for a SyntaxError. Rumor has it that continue was difficult to make
> work at all, while the other keywords, while ill-advised, were at least
> possible.
>
> --Ned.
>
Part of the rumour mill
http://www.gossamer-threads.com/lists/python/dev/484210? This was
referenced from the stackoverflow question that Ben Finney referred to
yesterday.
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
More information about the Python-list
mailing list