On Thu, 2004-12-09 at 10:33 -0500, Peter Hansen wrote:
> John Marshall wrote:
> > It seems to me that a file.__del__() _should_
> > call a file.close() to make sure that the file
> > is closed as a clean up procedure before
> > releasing the object.
>
> I believe it does, but I tried your experim
John Marshall wrote:
On Thu, 2004-12-09 at 08:41 -0500, Peter Hansen wrote:
John Marshall wrote:
Does anyone see a problem with doing:
data = file("tata").read()
... a perfectly good explanation
It seems to me that a file.__del__() _should_
> how he wishes it were designed
Isn't
John Marshall wrote:
It seems to me that a file.__del__() _should_
call a file.close() to make sure that the file
is closed as a clean up procedure before
releasing the object.
I believe it does, but I tried your experiment
with subclassing file and didn't ever see a
call to close, so I can only a
On Thu, 2004-12-09 at 08:41 -0500, Peter Hansen wrote:
> John Marshall wrote:
> > Hi,
> >
> > Does anyone see a problem with doing:
> > data = file("tata").read()
> >
> > Each time this is done, I see a new file
> > descriptor allocated (Linux) but not
> > released.
> >
> > 1) Will there ev
John Marshall wrote:
Hi,
Does anyone see a problem with doing:
data = file("tata").read()
Each time this is done, I see a new file
descriptor allocated (Linux) but not
released.
1) Will there ever be a point where I
will have a problem with file
descriptors because the garbage
collecto