Ian Bicking: the old part of his blog

More on python metaprogramming comment 000

I don't understand what you mean by that. Classes (and even instances) can certainly know that a descriptor exists in its own dict, like any other attribute.

The point is that the class has to do some extra stuff to find the attribute, where ActiveRecord/Ruby's technique doesn't require anything special in the class. You can't know that a column object exists until you search your __dict__. And follow MRO, for that matter.

I do explain right after this how you can make a class look for these things, and give attributes access to some of that extra information. I'd like for this to become a natural idiom in Python, not viewed as special magic. So I'd like a consistent set of practices, which doesn't presuppose what kind of object you are looking for (i.e., doesn't involve looking for all column attributes).

Comment on Re: More on Python Metaprogramming
by Ian Bicking