MCPcopy Create free account
hub / github.com/PlatformLab/NanoLog / Optional

Class Optional

preprocessor/docopt.py:232–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230
231
232class Optional(BranchPattern):
233
234 def match(self, left, collected=None):
235 collected = [] if collected is None else collected
236 for pattern in self.children:
237 m, left, collected = pattern.match(left, collected)
238 return True, left, collected
239
240
241class OptionsShortcut(Optional):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected