MCPcopy Index your code
hub / github.com/ipython/ipython / add

Method add

IPython/core/hooks.py:119–122  ·  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

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

Callers 15

clipboard_getFunction · 0.95
set_hookMethod · 0.95
do_ignore_moduleMethod · 0.45
structured_tracebackMethod · 0.45
structured_tracebackMethod · 0.45
__init__Method · 0.45
_load_extensionMethod · 0.45

Calls 1

sortMethod · 0.80