with open('com1', 'r') as f:

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Sun Apr 5 08:52:58 CEST 2009


In message <01e842d6$0$20654$c3e8da3 at news.astraweb.com>, Steven D'Aprano 
wrote:

> Firstly, what you describe is an implementation detail of CPython, not
> Python the language. Jython does not close files as soon as they become
> inaccessible, and IronPython and CLPython may not.

That's a limitation of Java-like virtual machines, which I have no intention 
of condonig.

> Secondly, even in CPython things may not be so simple. Not all file-like
> objects are built-in file objects.

Why is this relevant?




More information about the Python-list mailing list