Christian Rickert <m...@crickert.de> added the comment:

Noticed this odd behaviour with BooleanVar.get() as well:

class MyCheckbutton(Checkbutton):
        def __init__(self, parent, **options):
                Checkbutton.__init__(self, parent, **options)
                self.var = BooleanVar()
                self.configure(indicatoron=False, command=self.cb, 
variable=self.var)
                print(self.var.get)     # "<bound method BooleanVar.get of 
<tkinter.BooleanVar object at 0x245c310>>"
                print(self.var.get())   # "0"
        def cb(self, *events): # button callback (manual toggle)
                print(self.var.get)     # <bound method BooleanVar.get of 
<tkinter.BooleanVar object at 0x245c310>>
                print(self.var.get())   # True

Python 3.2.3 (default, May  3 2012, 15:51:42) 
[GCC 4.6.3] on linux2

----------
nosy: +crickert
versions:  -Python 2.7, Python 3.3

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15133>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to