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

Method __init__

Lib/tkinter/__init__.py:2764–2779  ·  view source on GitHub ↗

Construct a widget with the parent widget MASTER, a name WIDGETNAME and appropriate options.

(self, master, widgetName, cnf={}, kw={}, extra=())

Source from the content-addressed store, hash-verified

2762 self.master.children[self._name] = self
2763
2764 def __init__(self, master, widgetName, cnf={}, kw={}, extra=()):
2765 """Construct a widget with the parent widget MASTER, a name WIDGETNAME
2766 and appropriate options."""
2767 if kw:
2768 cnf = _cnfmerge((cnf, kw))
2769 self.widgetName = widgetName
2770 self._setup(master, cnf)
2771 if self._tclCommands is None:
2772 self._tclCommands = []
2773 classes = [(k, v) for k, v in cnf.items() if isinstance(k, type)]
2774 for k, v in classes:
2775 del cnf[k]
2776 self.tk.call(
2777 (widgetName, self._w) + extra + self._options(cnf))
2778 for k, v in classes:
2779 k.configure(self, v)
2780
2781 def destroy(self):
2782 """Destroy this and all descendants widgets."""

Callers

nothing calls this directly

Calls 7

_setupMethod · 0.95
_cnfmergeFunction · 0.85
isinstanceFunction · 0.85
itemsMethod · 0.45
callMethod · 0.45
_optionsMethod · 0.45
configureMethod · 0.45

Tested by

no test coverage detected