Confused with methods

jfj jfj at freemail.gr
Sun Feb 6 23:22:07 EST 2005


Alex Martelli wrote:

> jfj <jfj at freemail.gr> wrote:
> 
>>Isn't that inconsistent?
> 
> 
> That Python has many callable types, not all of which are descriptors?
> I don't see any inconsistency there.  Sure, a more generalized currying
> (argument-prebinding) capability would be more powerful, but not more
> consistent (there's a PEP about that, I believe).
> 

Thanks for the explanation.

The inconsistency I see is that if I wanted this kind of behavior
I would've used the staticmethod() builtin (which in a few words
alters __get__ to return the function unmodified).

So I would write

  A.foo = staticmethod (b.foo)

But now, it always acts as staticmethod:(

Anyway, if there's a PEP about it, I'm +1 because its "pythonic".


G.




More information about the Python-list mailing list