diff options
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 23aec02..95b2581 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.""" |