Python indentation

Christopher T King squirrel at WPI.EDU
Fri Jul 9 19:35:55 CEST 2004


On Fri, 9 Jul 2004, Josef Meile wrote:

> > Well, one could apply another coding style in this example:
> > 
> > if (condition) {
> >   doThis();
> >   doThat();
> > } else {
> >   doWhatever();
> >   andSoOn();
> > }
> I don't like that style. I think it's better to have the if and else at 
> the same level. ie:
> 
> if (condition) {
>    doThis();
>    doThat();
> }
> else {
>    doWhatever();
>    andSoOn();
> }

Pfft. We all know real men drop the braces altogether and just do it like 
this:

if (condition)
   doThis(),
   doThat();
else
   doWhatever(),
   andSoOn();

;)




More information about the Python-list mailing list