newb question about @property

Stephan Houben stephanh42 at gmail.com.invalid
Sun Oct 1 15:46:08 EDT 2017


Op 2017-10-01, Bill schreef <BILL_NOSPAM at whoknows.net>:
> Steve D'Aprano wrote:
>>
>> [1] Technically, the interpreter knows nothing about properties. What
>> it cares about is *descriptors*. Properties are just one kind of
>> descriptor, as are methods. But I'm intentionally not talking about
>> the gory details of descriptors. Feel free to ask if you care, but
>> honestly, you don't need to care unless you are writing your own
>> descriptor class.
>>
> I found the following page to be a very easily accessible discussion 
> about descriptors (it represents the state of my knowledge about 
> descriptors).   You got more?  : )
>
> https://www.programiz.com/python-programming/decorator

I found the page to be a discussion about decorators
(unsurprisingly given the URL) and not containing
the word "descriptor" at all...

Note that the remark from Steve is on the topic of descriptors.
I suppose the first advice to anybody wanting to learn about
either descriptors or decorators is to not confuse them
with the other thing.

Stephan



More information about the Python-list mailing list