You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
toml_string="""# This is a TOML document. Boom.title = "TOML Example"[owner]name = "Lance Uppercut"dob = 1979-05-27T07:32:00-08:00 # First class dates? Why not?[database]server = "192.168.1.1"ports = [ 8001, 8001, 8002 ]connection_max = 5000enabled = true[servers] # You can indent as you please. Tabs or spaces. TOML don't care. [servers.alpha] ip = "10.0.0.1" dc = "eqdc10" [servers.beta] ip = "10.0.0.2" dc = "eqdc10"[clients]data = [ ["gamma", "delta"], [1, 2] ]# Line breaks are OK when inside arrayshosts = [ "alpha", "omega"]"""importtomltoml.loads(toml_string)
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/Users/techdragon/.pyenv/versions/test/lib/python3.4/site-packages/toml.py", line 283, in loads
value, vtype = load_value(pair[1])
File "/Users/techdragon/.pyenv/versions/test/lib/python3.4/site-packages/toml.py", line 431, in load_value
v =int(v)
ValueError: invalid literal for int() with base 10: '1979-05-27T07:32:00-08:00'
The text was updated successfully, but these errors were encountered:
The datetime handling is currently not very robust. Per toml-lang/toml#263 the status of datetime literals in toml is not currently well defined. I am waiting for a resolution of that issue before investing more time in robust datetime parsing.
The text was updated successfully, but these errors were encountered: