file.close()
Erik Max Francis
max at alcyone.com
Fri Jul 25 15:10:20 EDT 2003
Bengt Richter wrote:
> 1) Is f.done() really necessary? I.e., doesn't an explicit del f take
> care of it
> if the object has been coded with a __del__ method? I.e., the idea
> was to get
> the effect of CPython's immediate effective del on ref count going
> to zero, right?
It wouldn't if there were circular references at that point. If you're
going to have some kind of `with' structure that constraints lifetimes,
I'd think you'd probably want something more concrete than just object
deletion; you'd want to make sure a "Stop whatever you were doing now"
method were present and called. But maybe that really depends on the
primary thing that the `with' construct would be used for.
--
Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
__ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
/ \ Love is when you wake up in the morning and have a big smile.
\__/ Anggun
More information about the Python-list
mailing list