diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-12-26 18:06:43 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-12-26 18:06:43 (GMT) |
commit | 1b97ed5abcad78c9513d605f0cb6b1936599a7b2 (patch) | |
tree | ec7158e2c59224072d51eab279d422e72c85dd86 /Lib/tkinter/__init__.py | |
parent | e575148cc23283f72aeeb0bff4a9343ce738aa92 (diff) | |
parent | d97c01ff2897a1d706b13d3684f8db69c8ea2ef3 (diff) | |
download | cpython-1b97ed5abcad78c9513d605f0cb6b1936599a7b2.zip cpython-1b97ed5abcad78c9513d605f0cb6b1936599a7b2.tar.gz cpython-1b97ed5abcad78c9513d605f0cb6b1936599a7b2.tar.bz2 |
Issue #20067: Tkinter variables now work when wantobjects is false.
Diffstat (limited to 'Lib/tkinter/__init__.py')
-rw-r--r-- | Lib/tkinter/__init__.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py index 68cf1b3..73fca8f 100644 --- a/Lib/tkinter/__init__.py +++ b/Lib/tkinter/__init__.py @@ -220,12 +220,12 @@ class Variable: _varnum += 1 if value is not None: self.initialize(value) - elif not self._tk.call("info", "exists", self._name): + elif not self._tk.getboolean(self._tk.call("info", "exists", self._name)): self.initialize(self._default) def __del__(self): """Unset the variable in Tcl.""" - if (self._tk is not None and self._tk.call("info", "exists", - self._name)): + if (self._tk is not None and + self._tk.getboolean(self._tk.call("info", "exists", self._name))): self._tk.globalunsetvar(self._name) def __str__(self): """Return the name of the variable in Tcl.""" |