Compare source code

Emile van Sebille emile at fenx.com
Thu Nov 4 13:36:04 EDT 2010


On 11/4/2010 7:15 AM Neil Cerutti said...
> The handsome ':' terminator of if/elif/if statements allows us to
> omit a newline, conserving vertical space. This improves the
> readability of certain constructs.
>
> if x: print(x)
> elif y: print(y)
> else: print()
>

Analogously, x+=1;y=f(x);return

We don't have to eliminate ':'s.

Emile




More information about the Python-list mailing list