Lost in descriptor land

Ankush Thakur ankush.thakur53 at gmail.com
Sat Jul 2 07:32:22 EDT 2016


On Friday, July 1, 2016 at 9:13:19 AM UTC+5:30, Lawrence D’Oliveiro wrote:
> 
> > Shouldn't we be instead using self.celcius in, say, __init__() and then
> > everything will work fine?
> 
> I guess it might. But this way, using descriptors, all the setup is done once at class definition, rather then every time in class instantiation.

So you're saying the (sole) reason to instantiate descriptor classes at class-level is performance?




More information about the Python-list mailing list