Richard Brodie a écrit :
"John Posner" <[email protected]> wrote in message news:[email protected]...

 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) )

In which case the last param is possibly redundant - the Block object knows its size, so it might be able to know by itself if it's empty.

NB : please notice the 'possibly' and 'might' cautions !-)
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to