Message279272
Yes, sure. It will break code. Maybe it's better to be explicit than implicit (another Python motto). It's also necessary to change configure(). This is the code for my version of _configure() and configure():
def _configure(self, cmd, cnf, kw):
"""Internal function."""
if kw:
cnf = _cnfmerge((cnf, kw))
elif cnf:
cnf = _cnfmerge(cnf)
if cnf is None:
return self._getconfigure(cmd)
if isinstance(cnf, str):
return self._getconfigure1(cmd + ('-'+cnf,))
self.tk.call(cmd + self._options(cnf))
# These used to be defined in Widget:
def configure(self, cnf=None, **kw):
"""Configure resources of a widget.
The values for resources are specified as keyword
arguments. To get an overview about
the allowed keyword arguments call the method keys.
"""
return self._configure((self._w, 'configure'), cnf, kw)
The semantics of getboolean is clear for me: Transform a true and false value in *Tcl* to an integer value: 1 or 0:
def getboolean(s):
"""Convert true and false to integer values 1 and 0."""
return _default_root.tk.getboolean(s)
I think that the C implementation of getboolean is right.
The true values for Tcl are: 1, true, yes.
And the false values are: 0, false, no
>>> tk.getboolean("true")
True
>>> tk.getboolean("false")
False
>>> tk.getboolean("0")
False
>>> tk.getboolean("1")
True
>>> tk.getboolean("yes")
True
>>> tk.getboolean("no")
False |
|
Date |
User |
Action |
Args |
2016-10-23 18:31:27 | tkinter | set | recipients:
+ tkinter, klappnase, serhiy.storchaka, GNJ |
2016-10-23 18:31:27 | tkinter | set | messageid: <1477247487.85.0.913246669438.issue28498@psf.upfronthosting.co.za> |
2016-10-23 18:31:27 | tkinter | link | issue28498 messages |
2016-10-23 18:31:27 | tkinter | create | |
|