[issue45197] IDLE should suppress ValueError for list.remove()
Terry J. Reedy
report at bugs.python.org
Tue Sep 14 23:00:13 EDT 2021
Terry J. Reedy <tjreedy at udel.edu> added the comment:
The offending function is
def event_delete(self, virtual, *sequences):
if virtual not in self.__eventinfo:
return
func, triplets = self.__eventinfo[virtual]
for seq in sequences:
triplet = _parse_sequence(seq)
if triplet is None:
#print("Tkinter event_delete: %s" % seq, file=sys.__stderr__)
widget.event_delete(self, virtual, seq)
else:
if func is not None:
self.__binders[triplet[1]].unbind(triplet, func)
triplets.remove(triplet)
The triplets collection is part of *virtual* whereas each triplet is derived from a member of sequences.
The discrepancy seems to be extremely rare. I will catch the exception until such time as I see a plausible, reproducible, and testable reason.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45197>
_______________________________________
More information about the Python-bugs-list
mailing list