[Numpy-discussion] Should ndarray be a context manager?
robert.kern at gmail.com
Tue Dec 9 15:31:37 EST 2014
On Tue, Dec 9, 2014 at 8:15 PM, Chris Barker <chris.barker at noaa.gov> wrote:
> (although I'm still confused as to why it's so important (in cPython) to
> have a file context manager..)
Because you want the file to close when the exception is raised and not at
some indeterminate point thereafter when the traceback stack frames finally
get disposed of, which can be an indefinitely long time.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion