[Python-3000] GUI -- an API, not a toolkit
Greg Ewing
greg.ewing at canterbury.ac.nz
Wed May 10 07:52:14 CEST 2006
Giovanni Bajo wrote:
> No, you're over-generalizing. What if I wanted the buttons Ok/Cancel instead?
> Or "Abort"/"Retry"/"Cancel"? The mental overhead is having to remember
> different APIs from the Yes/No case, if you're going to use a specialized
> version returning just a boolean.
In PyGUI I've tried to get some consistency here by
returning 1 or 0 for Yes-No dialogs (so you can
use it as a boolean if you want) and 1, 0, -1 for
three buttons (Yes, No, Cancel).
--
Greg
More information about the Python-3000
mailing list