MCPcopy Create free account
hub / github.com/dateutil/dateutil / __init__

Method __init__

src/dateutil/parser/_parser.py:58–71  ·  view source on GitHub ↗
(self, instream)

Source from the content-addressed store, hash-verified

56 _split_decimal = re.compile("([.,])")
57
58 def __init__(self, instream):
59 if isinstance(instream, (bytes, bytearray)):
60 instream = instream.decode()
61
62 if isinstance(instream, str):
63 instream = StringIO(instream)
64 elif getattr(instream, 'read', None) is None:
65 raise TypeError('Parser must be a string or character stream, not '
66 '{itype}'.format(itype=instream.__class__.__name__))
67
68 self.instream = instream
69 self.charstack = []
70 self.tokenstack = []
71 self.eof = False
72
73 def get_token(self):
74 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected