Sept. 28, 2020
8:12 a.m.
This reminds me of a previous proposal I can't remember if I hit the list with, allowing with open(filename.json, "r") as f: my_dict = json.load(f) to be spelt as a single expression: my_dict = (json.load(f) with open(filename.json, "r") as f) Obviously this would be more useful in comprehensions, but it might encourage people not to lazily write `json.load(open("filename.json", "r"))` because they want an expression, and end up leaving files open. Eric