Code formatting question: conditional expression

John Posner jjposner at optimum.net
Tue Aug 18 10:58:05 EDT 2009


>
> My choice would be
>
> excessblk = None
> if total > P.BASE:
>     excessblk = ...
>

Diez and Jean-Michel,

Ha! Your suggestion above was my *original* coding. It looks like I'm 
evolving backwards!

But doesn't it violate the DRY principle? The token "excessblk" appears 
twice instead of once.

Thanks again,
John




More information about the Python-list mailing list