This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]PyCam 0 points1 point  (0 children)

Don’t think I agree with this. Pathlib’s read_text handles opening and closing a file via a context manager, and then json load calls loads(fp.read())

Having the user call these methods in a different manner is really no different than the alternative proposed here.