Python Attribute Access and the Descriptor Protocol

Let’s look at the following snippet:

We already know how Foo instantiation works. Today, our question is this:

This is a companion discussion topic for the original entry at

I think that in your implementation of __getattribute__() the order of resolution between instance and class is wrong: first is tried the instance and then the class.