Claudio Grondi wrote: > Steve Holden wrote: [snip..] > The problem here is, that I mean, that in Python it makes no sense to > talk about a value of an object, because it leads to weird things when > trying to give a definition what a value of an object is. >
You're saying that C and Java get round that problem by sometimes defining value to mean 'the memory address and object is stored at'. That hardly seems to clarify what value *really* means, and can lead to some interesting confusions. Anyway - for the basic datatypes 'value' seems quite clear. It's only not clear what this might mean in user defined classes - where value means whatever you define it to mean. By overloading the comparison and rich comparison methods of user defined classes, you have the opportunity to *precisely* define the meaning of value... > It seems, that in Python there is a lack of operator able to compare > values as it is the case in C and Javascript, simply because in Python > there are no really such things as values, so there is no need to > compare them. > Can you provide an example to clarify what you mean ? All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list