toml icon indicating copy to clipboard operation
toml copied to clipboard

dump function file handling

Open jwaggy opened this issue 6 years ago • 1 comments

ahoy,

Long time enjoyer of this library.

Is there a reason that toml.dump doesn't open a file itself like toml.load does? If so could someone or myself add this?

jwaggy avatar Dec 06 '18 17:12 jwaggy

Hello!

The intent of dump/load and dumps/loads was to mimic python's builtin json module.

I suppose there is no technical reason that dump couldn't support that usage in a backwards compatible way. If you want to open a pull request which adds that (plus tests :smile: ), I would be more than happy to take a look at it!

uiri avatar Dec 07 '18 02:12 uiri