Clarifications:
1. I miswrote part of my first post where I wrote "I want to test if
symbol found in __dict__ is an attribute or not in python code".
I meant to write "is a DESCRIPTOR" or not.
2. The example in https://docs.python.org/3/howto/descriptor.html for
reproducing `type.__getattribut
On Tue, Oct 30, 2018 at 04:40:40AM -0400, Joy Diamond wrote:
> """
> For classes, the machinery is in type.__getattribute__() which transforms
> B.x into B.__dict__['x'].__get__(None, B). In pure Python, it looks like:
>
> def __getattribute__(self, key):
> "Emulate type_getattro() in Objects
Greetings,
I am trying to emulate attribute lookup, and want to test if symbol found
in __dict__ is an attribute or not in python code (i.e.: does its have a
`tp_descr_get` slot?)
Reading the documentation carefully, I am supposed to test if the attribute
has a `.__get__` method; however, I see n