I know that with user classes one can define getattr, setattr to handle dictionary lookup. Is there a way to hook into the native dict() type and see in real time what's being queried. I wanted to check if when one does: x.sin() if the x.__dict__ was queried or if the Foo.__dict__ was queried.. I know method/attribute lookup starts with the instance but was wondering if I could see it in action vs defining __getattr__ __setattr__ in Foo which is a bit indirect.. and not what I want.