MCPcopy
hub / github.com/docopt/docopt / TokenStream

Class TokenStream

docopt.py:289–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

287
288
289class TokenStream(list):
290
291 def __init__(self, source, error):
292 self += source.split() if hasattr(source, 'split') else source
293 self.error = error
294
295 def move(self):
296 return self.pop(0) if len(self) else None
297
298 def current(self):
299 return self[0] if len(self) else None
300
301
302def parse_long(tokens, options):

Callers 3

test_parse_argvFunction · 0.90
parse_patternFunction · 0.85
docoptFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_parse_argvFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…