-
Alex Martelli to the rescue:
In the new-style object model, implicit use of special methods always relies on the class-level binding of the special method, if any ... [this] regularizes and simplifies the relationship between classes and metaclasses, covered in "Metaclasses" later in this chapter.
Python in a Nutshell, p.87-88
-
I can't say I like it, but new style classes at lesat (AFAKI) are consistent and _all_ __special__ methods are looked up on the class.
what I would like to know is why, I have heard that it makes certain things conceptually simpler, but still don't really understand why this is needed at all. Anyone knows?
I would think that if _all_ methods resolution should work the same way, but maybe I'm missing something?
-
re anonymous coward:
Yes, that is exactly the quote I was thinking about. Still I don't understand how making __special__ methods special helps with metaclasses.