Is double close in strace necessarily bad?
Is double close in strace necessarily bad? Question: I am training a neural network. Somewhere in my code base, I have a code snippet like the following: def foo(): d = {} with PIL.Image.open(img_path) as img: d["img"] = torchvision.transforms.functional.to_tensor(img) return d This code doesn’t cause any problems. However, when I run my program under strace, …