MCPcopy Create free account
hub / github.com/ipython/ipython / add

Method add

IPython/core/hooks.py:122–125  ·  view source on GitHub ↗

Add a func to the cmd chain with given priority

(self, func, priority=0)

Source from the content-addressed store, hash-verified

120 return str(self.chain)
121
122 def add(self, func, priority=0):
123 """ Add a func to the cmd chain with given priority """
124 self.chain.append((priority, func))
125 self.chain.sort(key=lambda x: x[0])
126
127 def __iter__(self):
128 """ Return all objects in chain.

Callers 15

clipboard_getFunction · 0.95
set_hookMethod · 0.95
structured_tracebackMethod · 0.45
structured_tracebackMethod · 0.45
load_extensionMethod · 0.45
reload_extensionMethod · 0.45
compress_dhistFunction · 0.45
_deduplicate_completionsFunction · 0.45

Calls 1

sortMethod · 0.80

Tested by 4

fMethod · 0.36
fMethod · 0.36