[Python-ideas] Updating PEP 315: do-while loops

Steven D'Aprano steve at pearwood.info
Sun Apr 26 07:20:23 CEST 2009


On Sun, 26 Apr 2009 03:06:14 pm Josiah Carlson wrote:
> Condition at the bottom sucks for similar reasons as why ...
> def foo(...):
>     (many lines of code)
> foo = classmethod(foo)
>
> Having your condition, modification, etc., at the end is just plain
> annoying.  I like my conditions up top.

But if the condition isn't tested until the bottom of the block, then 
putting it at the top is weird.


-- 
Steven D'Aprano



More information about the Python-ideas mailing list