4 ms·
It’s not pedantic. It’s a very important distinction for exactly this use case. The CSV library doesn’t and shouldn’t close the source object because it may not
by throwaway894345 6y ago
It’s not pedantic. It’s a very important distinction for exactly this use case. The CSV library doesn’t and shouldn’t close the source object because it may not have a close method and even if it does, someone else might be planning on closing it later (the scope that owns it) which might be an error depending on the implementation of the source’s close() method. Only the resource owner should close it, and the CSV library shouldn’t be the owner.