toml compatibility - load('some.toml') fails
xsuchy opened this issue · comments
Miroslav Suchý commented
I am migrating from toml. And tomli claims full compatibility. But with toml I was able to:
load('some.toml')
but with tomli I get:
tomli.load('some.toml')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.11/site-packages/tomli/_parser.py", line 59, in load
b = __fp.read()
^^^^^^^^^
AttributeError: 'str' object has no attribute 'read'
Shantanu commented
tomli claims compatibility with the TOML spec, not API compatibility with the defunct toml
Python library