anything like C++ references?

JanC usenet_spam at janc.invalid
Tue Jul 15 16:42:40 EDT 2003


aahz at pythoncraft.com (Aahz) schreef:

> What's the value of a file object?  I think in a
> very real sense, a file object doesn't have a "value".  You could try
> arguing that the file contents are the value, but that value is not
> contained within the object -- the object is a proxy.

IANACS[*] but I would think the combination of all the file's properties is 
the value of a file object: the file contents, the filename, any associated 
metadata, the seek pointer, the ability to read from and write to the 
contents, etc.  The fact that parts of the object, e.g. the contents, are 
stored on "external memory" instead of in "internal memory" is an 
irrelevant implementation detail IMHO...

I think of an object's "value" as the whole set of "properties" (the real 
world term, not the often limited programming term) that makes it have some 
"worth".


[*] I Am Not A Computer Scientist  ;)

-- 
JanC

"Be strict when sending and tolerant when receiving."
RFC 1958 - Architectural Principles of the Internet - section 3.9




More information about the Python-list mailing list