[issue39152] Faulty override of tkinter.Misc.configure in tkinter.ttk.Scale.configure
Terry J. Reedy
report at bugs.python.org
Fri Jan 3 17:48:56 EST 2020
Terry J. Reedy <tjreedy at udel.edu> added the comment:
Your code is buggy because 'cursor' is not a dict or anything like one.
On the other hand, adding retval to capture and return the return from Widget.configure looks correct. (And it will not prevent kw.update('cursor') from raising. The current code is
def configure(self, cnf=None, **kw):
"""Modify or query scale options.
Setting a value for any of the "from", "from_" or "to" options
generates a <<RangeChanged>> event."""
if cnf:
kw.update(cnf)
Widget.configure(self, **kw)
if any(['from' in kw, 'from_' in kw, 'to' in kw]):
self.event_generate('<<RangeChanged>>')
)
To review, test, and make the change, a github Pull Request (PR) is needed. I will make one.
----------
nosy: +serhiy.storchaka, terry.reedy
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39152>
_______________________________________
More information about the Python-bugs-list
mailing list