semicolon at end of python's statements

Paul Rudin paul.nospam at rudin.co.uk
Sat Aug 31 04:00:50 EDT 2013


Jussi Piitulainen <jpiitula at ling.helsinki.fi> writes:


> # Option 1.5
> for spam in sequence:
>     if not predicate(spam): continue
>     process(spam)
>
> This saves an indent level.

Just out of interest: is saving an indent level a useful thing?

I wouldn't lay out my code like that just because if you're coming back
to it later and reading through quickly it's (to my mind at least)
easier to miss what's going on.



More information about the Python-list mailing list