Feature request: overloading load/dump to accept filename/paths
neutrinoceros opened this issue · comments
Would you be interested in a patch to allow pytomlpp.load
and pytomlpp.dump
to accept a filename/path object instead of an io.TextIOBase
object ?
Rationale: this change would allow for a seamless migration from the better known pure Python toml parser to this package. The whole process would be done by simply replacing
import toml
with
import pytomlpp as toml
Ack, isn't this a breaking change? I will need to consider if this s a breaking change.
I honestly don't think it has to be, unless you consider that raising an error from pytomlpp.load("myfile.toml")
is a feature :)
I'm game to propose a patch, with tests.
That would be great! Thanks!