[Python-ideas] Descriptor __get__ and __set__ argument discrepancy

2023-10-18 Thread Dom Grigonis
Hi all, Quick question. def __get__(self, instance, owner): def __set__(self, instance, value): Is there a reason why `__set__` does not have owner in it’s arguments while `__get__` does? Regards, DG ___ Python-ideas mailing list -- python-ideas@pyt

[Python-ideas] Re: Descriptor __get__ and __set__ argument discrepancy

2023-10-18 Thread dn via Python-ideas
On 19/10/2023 18.29, Dom Grigonis wrote: def __get__(self, instance, owner): def __set__(self, instance, value): Is there a reason why `__set__` does not have owner in it’s arguments while `__get__` does? Is this a Python Idea? You may have only given us a couple of lines, when the scope o

[Python-ideas] Re: Descriptor __get__ and __set__ argument discrepancy

2023-10-18 Thread Dom Grigonis
Thank you, Good information, thank you. Was not aware of __set_name__. DG > On 19 Oct 2023, at 09:28, dn via Python-ideas wrote: > > On 19/10/2023 18.29, Dom Grigonis wrote: >> def __get__(self, instance, owner): >> def __set__(self, instance, value): >> Is there a reason why `__set__` does