-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Leading zeroes in floating-point indexes raise a TomlError #9
Comments
Ah, thanks. I'm not sure if leading zeros are allowed in the exponent part or not, so I've opened toml-lang/toml#356. In any case, I don't see a reason why the parser shouldn't be lenient here and I'll make the changes right away. Thank you for the report! |
I take it back, the leading zeroes are explicitly in the invalid test suite, see: https://github.com/avakar/toml-test/blob/master/tests/invalid/exponent-leading-zero-pos.toml. You can argue about the validity of this rule in the issue I opened for toml-lang, but I'll be closing this without a fix. |
Ok, I might need to slow down :) The negative test case was only added into my fork of a test suite, the "official" tests do not have it. As such, it might not be the official stance of toml-lang and I'll keep this issue open for now. I'll wait for toml-lang's comment before making any changes to pytoml. Sorry for the chaos. |
Since there is no answer on toml-lang, I decided to allow leading zeroes in exponents for now. Released as pytoml-0.1.6. |
The following code raises a TomlError exception both under Python2 and Python3:
The error message is the following:
Removing the leading zero solves the problem:
The text was updated successfully, but these errors were encountered: