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

Method add_s

IPython/utils/strdispatch.py:28–33  ·  view source on GitHub ↗

Adds a target 'string' for dispatching

(self, s, obj, priority= 0 )

Source from the content-addressed store, hash-verified

26 self.regexs = {}
27
28 def add_s(self, s, obj, priority= 0 ):
29 """ Adds a target 'string' for dispatching """
30
31 chain = self.strs.get(s, CommandChainDispatcher())
32 chain.add(obj,priority)
33 self.strs[s] = chain
34
35 def add_re(self, regex, obj, priority= 0 ):
36 """ Adds a target regexp for dispatching """

Callers 1

set_hookMethod · 0.80

Calls 2

addMethod · 0.45

Tested by

no test coverage detected