[Python-ideas] Add pathlib.Path.write_json and pathlib.Path.read_json

Serhiy Storchaka storchaka at gmail.com
Mon Mar 27 10:43:19 EDT 2017


On 27.03.17 15:50, Ram Rachum wrote:
> Hi guys,
>
> What do you think about adding methods pathlib.Path.write_json and
> pathlib.Path.read_json , similar to write_text, write_bytes, read_text,
> read_bytes?
>
> This would make writing / reading JSON to a file a one liner instead of
> a two-line with clause.

Good try, but you have published this idea 5 days ahead of schedule.




More information about the Python-ideas mailing list