On Sun, Dec 19, 2021 at 8:10 AM Ethan Furman <ethan@stoneleaf.us> wrote:
By way of correcting misconceptions:
On 12/18/21 8:39 AM, Chris Angelico wrote:
I'm not sure that this is actually possible the way you're doing it. The descriptor protocol (which is what makes properties work) won't apply when you're looking up statically.
On 12/18/21 9:19 AM, Christopher Barker wrote:
Anyway, the thing is that both staticmethod and property are implimented using descriptors, which I think can only be invoked by instance attribute lookup. That is, the class attribute IS a descriptor instance.
While it is true that a descriptor does not get the chance to run its `__set__` and `__delete__` methods when called on the class, it does get to run its `__get__` method.
Ah, thanks for clarifying that. ChrisA