Immutability

Nick Maclaren nmm1 at cus.cam.ac.uk
Wed Jun 28 11:57:30 EDT 2006


In article <mailman.7571.1151508757.27775.python-list at python.org>,
"Fredrik Lundh" <fredrik at pythonware.com> writes:
|> 
|> a property looks like an attribute, not a method, so you're trying to call whatever
|> your "joe()" method returns.

Well, yes, that was pretty obvious - but what was NOT obvious is why it
should do that for one of two identical methods.

|> (that's what "a function for getting an attribute value" in the property documentation
|> refers to).

Well, as joe is an attribute of the class fred, and the decorator is applied
to the declaration of joe within fred, I assumed that it referred to getting
joe from fred.  That certainly doesn't appear to be the case, and I don't
see how it helps with my original request if not.


Regards,
Nick Maclaren.



More information about the Python-list mailing list