MCPcopy Index your code
hub / github.com/docopt/docopt / match

Method match

docopt.py:228–236  ·  view source on GitHub ↗
(self, left, collected=None)

Source from the content-addressed store, hash-verified

226class Required(ParentPattern):
227
228 def match(self, left, collected=None):
229 collected = [] if collected is None else collected
230 l = left
231 c = collected
232 for p in self.children:
233 matched, l, c = p.match(l, c)
234 if not matched:
235 return False, left, collected
236 return True, l, c
237
238
239class Optional(ParentPattern):

Callers 1

Calls 1

matchMethod · 0.45

Tested by 1