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

Method bind

Lib/idlelib/multicall.py:334–350  ·  view source on GitHub ↗
(self, sequence=None, func=None, add=None)

Source from the content-addressed store, hash-verified

332 for i in range(len(_types))]
333
334 def bind(self, sequence=None, func=None, add=None):
335 #print("bind(%s, %s, %s)" % (sequence, func, add),
336 # file=sys.__stderr__)
337 if type(sequence) is str and len(sequence) > 2 and \
338 sequence[:2] == "<<" and sequence[-2:] == ">>":
339 if sequence in self.__eventinfo:
340 ei = self.__eventinfo[sequence]
341 if ei[0] is not None:
342 for triplet in ei[1]:
343 self.__binders[triplet[1]].unbind(triplet, ei[0])
344 ei[0] = func
345 if ei[0] is not None:
346 for triplet in ei[1]:
347 self.__binders[triplet[1]].bind(triplet, func)
348 else:
349 self.__eventinfo[sequence] = [func, []]
350 return widget.bind(self, sequence, func, add)
351
352 def unbind(self, sequence, funcid=None):
353 if type(sequence) is str and len(sequence) > 2 and \

Callers 15

__init__Method · 0.45
__init__Method · 0.45
show_windowMethod · 0.45
make_guiMethod · 0.45
_bind_eventsMethod · 0.45
create_page_fontMethod · 0.45
create_page_highlightMethod · 0.45
create_page_keysMethod · 0.45
create_frame_helpMethod · 0.45
__init__Method · 0.45

Calls 1

unbindMethod · 0.45

Tested by

no test coverage detected