
Sept. 15, 2020
7:10 a.m.
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.