MCPcopy Index your code
hub / github.com/RustPython/RustPython / trace_remove

Method trace_remove

Lib/tkinter/__init__.py:467–484  ·  view source on GitHub ↗

Delete the trace callback for a variable. Mode is one of "read", "write", "unset" or a list or tuple of such strings. Must be same as were specified in trace_add(). cbname is the name of the callback returned from trace_add().

(self, mode, cbname)

Source from the content-addressed store, hash-verified

465 return cbname
466
467 def trace_remove(self, mode, cbname):
468 """Delete the trace callback for a variable.
469
470 Mode is one of "read", "write", "unset" or a list or tuple of
471 such strings. Must be same as were specified in trace_add().
472 cbname is the name of the callback returned from trace_add().
473 """
474 self._tk.call('trace', 'remove', 'variable',
475 self._name, mode, cbname)
476 for m, ca in self.trace_info():
477 if self._tk.splitlist(ca)[0] == cbname:
478 break
479 else:
480 self._tk.deletecommand(cbname)
481 try:
482 self._tclCommands.remove(cbname)
483 except ValueError:
484 pass
485
486 def trace_info(self):
487 """Return all trace callback information."""

Callers 1

destroyMethod · 0.80

Calls 4

trace_infoMethod · 0.95
deletecommandMethod · 0.80
callMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected