-
Notifications
You must be signed in to change notification settings - Fork 191
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
Bug: failed to parse mixed types in Array #341
Comments
Maybe try:
```
>> import toml
>> x1 = """... [section]
... test = [1, "a"]
... """
>> toml.loads(x1)
```
??
|
I don't know if you actually tried your code. I got an exception and The exception clearly indicates that the error was due to array types are not the same. Per spec, it should be supported. So it has nothing to do with grouping the data inside another key I used yaml instead to work around this instead of toml. The issue is certainly there. |
I believe there is another bug which says this behavior should be added as
per a newer version of the spec.
#324
…On Sat, Dec 5, 2020 at 2:22 PM Han Chen ***@***.***> wrote:
Maybe try:
import toml>>> x1 = """... [section]
... test = [1, "a"]... """>>> toml.loads(x1) ??
I don't know if you actually tried your code. I got an exception and toml.decoder.TomlDecodeError:
Not a homogeneous array ...
The exception clearly indicates that the error was due to array types are
not the same. Per spec, it should be supported. So it has nothing to do
with grouping the data inside another key section as suggested. You would
get the same error. I checked the master branch decoder.py and the
exception is still there when it tries to decode the array.
I used yaml instead to work around this instead of toml. The issue is
certainly there.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#341 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AL73FM4JP5UB2OPCCNXUUNTSTKB7VANCNFSM4UBPLHWA>
.
|
See repl snippet to reproduce
Per toml v1.0.0-rc3 spec, values of different types may be mixed.
The text was updated successfully, but these errors were encountered: