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

Method __init__

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected