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

Class _setit

Lib/tkinter/__init__.py:4287–4298  ·  view source on GitHub ↗

Internal class. It wraps the command in the widget OptionMenu.

Source from the content-addressed store, hash-verified

4285
4286
4287class _setit:
4288 """Internal class. It wraps the command in the widget OptionMenu."""
4289
4290 def __init__(self, var, value, callback=None):
4291 self.__value = value
4292 self.__var = var
4293 self.__callback = callback
4294
4295 def __call__(self, *args):
4296 self.__var.set(self.__value)
4297 if self.__callback is not None:
4298 self.__callback(self.__value, *args)
4299
4300
4301class OptionMenu(Menubutton):

Callers 2

SetMenuMethod · 0.90
__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…