How does the super type present itself and do lookups?

Greg Ewing greg.ewing at canterbury.ac.nz
Thu Mar 19 18:02:30 EDT 2020


On 11/03/20 7:02 am, Adam Preble wrote:
> Is this foo attribute being looked up in an override of __getattr__, __getattribute__, or is it a reserved slot that's internally doing this? That's what I'm trying to figure out.

Looking at the source in Objects/typeobject.c, it uses the
tp_getattro type slot, which corresponds to __getattribute__.

-- 
Greg



More information about the Python-list mailing list