Joao S. O. Bueno writes:

 > If .load and .dump are super-charged, people coding with these
 > methods in mind have _one_ less_ thing to worry about: if the
 > method accepts a path or an open file becomes irrelevant.

But then you either lose the primary benefit of this three line
function (defaulting to the UTF-8 encoding to conform to the JSON
standard), or you have a situation where what encoding you get can
depend on whether you use the name of a file or that file already
opened.

I consider that worse because it's precisely the kind of thing that
people *don't* worry about and *do* have some difficulty debugging.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/KO3ZZNTDMFZD26QGPTSNEXP2ALRDWOMF/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to