Code formatting question: conditional expression
Richard Brodie
R.Brodie at rl.ac.uk
Tue Aug 18 11:27:52 EDT 2009
"John Posner" <jjposner at optimum.net> wrote in message
news:mailman.26.1250604346.2854.python-list at python.org...
> if total > P.BASE:
> excessblk = Block(total - P.BASE, srccol, carry_button_suppress=True)
> else:
> excessblk = None
I wonder if it is appropriate to replace the None sentinel with one that is an instance
of Block() e.g.
size = total - P.BASE
excessblk = Block(size, srccol, carry_button_suppress=True, empty_block=(size <= 0) )
More information about the Python-list
mailing list