when should I explicitly close a file?

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Tue Apr 27 12:06:07 CEST 2010


In message <mailman.2162.1272018097.23598.python-list at python.org>, Adam 
Tauno Williams wrote:

> On Fri, 2010-04-23 at 16:29 +1200, Lawrence D'Oliveiro wrote:
>
>> Any implementation that doesn’t do reference-counting is brain-damaged.
> 
> Why?

Because a) it uses extra memory needlessly, and b) waiting until an object 
has dropped out of cache before touching it again just slows things down.

> There are much better ways to do memory management / garbage
> collection;  especially when dealing with large applications.

Especially with large applications, the above considerations apply even more 
so.

If you don’t agree, you might as well stick to Java.



More information about the Python-list mailing list