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

Method add

Lib/idlelib/configdialog.py:2238–2253  ·  view source on GitHub ↗

Add (var, callback) tuple to untraced list. Args: var: Tk variable instance. callback: Either function name to be used as a callback or a tuple with IdleConf config-type, section, and option names used in the default callback.

(self, var, callback)

Source from the content-addressed store, hash-verified

2236 self.traced.clear()
2237
2238 def add(self, var, callback):
2239 """Add (var, callback) tuple to untraced list.
2240
2241 Args:
2242 var: Tk variable instance.
2243 callback: Either function name to be used as a callback
2244 or a tuple with IdleConf config-type, section, and
2245 option names used in the default callback.
2246
2247 Return:
2248 Tk variable instance.
2249 """
2250 if isinstance(callback, tuple):
2251 callback = self.make_callback(var, callback)
2252 self.untraced.append((var, callback))
2253 return var
2254
2255 @staticmethod
2256 def make_callback(var, config):

Callers 5

create_page_fontMethod · 0.45
create_page_highlightMethod · 0.45
create_page_keysMethod · 0.45
create_page_windowsMethod · 0.45
create_page_shedMethod · 0.45

Calls 2

make_callbackMethod · 0.95
appendMethod · 0.45

Tested by

no test coverage detected