Definition of "property"

Jon Ribbens jon+usenet at unequivocal.eu
Tue Jun 1 08:19:13 EDT 2021


On 2021-06-01, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> On 1/06/21 2:34 am, Jon Ribbens wrote:
>>  From the outside, it's just a *data* attribute. Which, from the inside,
>> it isn't. Hence "pretending".
>
> But what is it about the external appearance that would make
> you think it's a data attribute, rather than some other kind
> of attribute?

I already answered that in the post you are responding to, but you
snipped it: You can tell something's definitely not a data attribute
if you have to put brackets after its name to call it as a method to
invoke its function or retrieve the value it returns.

> (I'm assuming that by "data attribute" you mean a piece of
> data that's stored directly in the object. If you mean
> something else, we might be talking at cross purposes.)

I mean it in the sense it is used by the Python documentation.


More information about the Python-list mailing list