Basic Python Query

Ulrich Eckhardt ulrich.eckhardt at dominolaser.com
Fri Aug 23 03:12:51 EDT 2013


Am 23.08.2013 05:28, schrieb Steven D'Aprano:
> On Thu, 22 Aug 2013 13:54:14 +0200, Ulrich Eckhardt wrote:
>> When the Python object goes away, it doesn't necessarily affect
>> thethread or file it represents.
 >
> That's certainly not true with file objects. When the file object goes
> out of scope, the underlying low-level file is closed.

Ahem, yes, but no: Calling close(fd) is not the same as destroying the 
file, I'm pretty sure it's still on my harddisk after that. That is also 
the difference to strings, where the Python object really is all there 
is to it. Similarly you can only customize the Python side of things 
with derivation, the other side will remain the same, apart from the 
data you write to the file or the code you run in the thread.

Steven, thank you for taking the time to read and consider what I wrote, 
it is appreciated!

Uli




More information about the Python-list mailing list