toml icon indicating copy to clipboard operation
toml copied to clipboard

TomlDecodeError when decoding hex values without a space

Open bj0 opened this issue 5 years ago • 1 comments

with toml version 0.10.1,

toml.loads('var = 0xb0')

works, but:

toml.loads('var=0xb0')

throws

toml.decoder.TomlDecodeError: Invalid date or number (line 1 column 1 char 0)

bj0 avatar Jul 21 '20 21:07 bj0

It looks like toml.loads('var = 0xb0') works only by accident; the TOML 1 has support for hexadecimal but lower versions didn't, and the test suite doesn't test against hexadecimal, binary, or octal. It's currently parsed as a time.

snapperVibes avatar Dec 10 '20 02:12 snapperVibes