MCPcopy Index your code
hub / github.com/python/cpython / _unbind

Method _unbind

Lib/tkinter/__init__.py:1576–1587  ·  view source on GitHub ↗
(self, what, funcid=None)

Source from the content-addressed store, hash-verified

1574 self._unbind(('bind', self._w, sequence), funcid)
1575
1576 def _unbind(self, what, funcid=None):
1577 if funcid is None:
1578 self.tk.call(*what, '')
1579 else:
1580 lines = self.tk.call(what).split('\n')
1581 prefix = f'if {{"[{funcid} '
1582 keep = '\n'.join(line for line in lines
1583 if not line.startswith(prefix))
1584 if not keep.strip():
1585 keep = ''
1586 self.tk.call(*what, keep)
1587 self.deletecommand(funcid)
1588
1589 def bind_all(self, sequence=None, func=None, add=None):
1590 """Bind to all widgets at an event SEQUENCE a call to function FUNC.

Callers 5

unbindMethod · 0.95
unbind_allMethod · 0.80
unbind_classMethod · 0.80
tag_unbindMethod · 0.80
tag_unbindMethod · 0.80

Calls 6

deletecommandMethod · 0.95
callMethod · 0.45
splitMethod · 0.45
joinMethod · 0.45
startswithMethod · 0.45
stripMethod · 0.45

Tested by

no test coverage detected