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

Method dispatch

IPython/utils/strdispatch.py:42–52  ·  view source on GitHub ↗

Get a seq of Commandchain objects that match key

(self, key)

Source from the content-addressed store, hash-verified

40 self.regexs[regex] = chain
41
42 def dispatch(self, key):
43 """ Get a seq of Commandchain objects that match key """
44 if key in self.strs:
45 yield self.strs[key]
46
47 for r, obj in self.regexs.items():
48 if re.match(r, key):
49 yield obj
50 else:
51 #print "nomatch",key # dbg
52 pass
53
54 def __repr__(self):
55 return "<Strdispatch %s, %s>" % (self.strs, self.regexs)

Callers 1

flat_matchesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected