Descriptors vs Property

Ethan Furman ethan at stoneleaf.us
Wed Mar 16 11:15:19 EDT 2016


On 03/11/2016 09:59 PM, Veek. M wrote:

> A property uses the @property decorator and has @foo.setter
> @foo.deleter.
>
> A descriptor follows the descriptor protocol and implements the __get__
> __set__ __delete__ methods.

`property` is a descriptor combined with a decorator, so is a little 
more complex to understand.

--
~Ethan~




More information about the Python-list mailing list