Code formatting question: conditional expression

Nicola Larosa (tekNico) nicola.larosa at
Tue Aug 25 18:06:37 CEST 2009

John Posner wrote:
> Is there any consensus on how to format a conditional expression
> that is too long for one line?

Here's my take:

    excessblk = Block(total - P.BASE, srccol,
        ) if total > P.BASE else None

Nicola Larosa -

Nobody knows everything, and nobody is expected to be perfect
in the Ubuntu community (except of course the SABDFL).

More information about the Python-list mailing list