[issue1774370] Add Tkinter.Checkbutton get() and set(value)

Guilherme Polo report at bugs.python.org
Fri Jun 27 00:43:17 CEST 2008


Guilherme Polo <ggpolo at gmail.com> added the comment:

> Graham Horler <grahamh at users.sourceforge.net> added the comment:
>
>> I'm aware of that and that is why everywhere I see Checkbutton
>> being used I see a explicit variable being created.
>
> Absolutely the reason for this patch, to get rid of unnecessary code.
> What's not to like?

You are not getting my point here. What I'm trying to say is: if you
are going to add such code to make it easier to get/set the variable
option value then you better add it to every other widget that
supports a variable option, or a textvariable (*variable in general).
This would make things uniform, you would never need to create a
Variable instance yourself. What I would really hate to see is a
widget that acts like a Variable was created for me, so I can
access/set its value, and others that have the same option but doesn't
allow me that.
And, finally, being explicit is not a bad thing.

>
>> I was referring to the other widgets that accepts *variable options.
>> ... add this functionality everywhere it would cause some
>> benefit, not only for Checkbutton.
>
> I'm all for that, just could not find another widget that created an
> inaccessible default variable.  Suggestions welcome.
>

Radiobutton for example ?

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1774370>
_______________________________________


More information about the Python-bugs-list mailing list