the annoying, verbose self

Bruno Desthuilliers bruno.42.desthuilliers at wtf.websiteburo.oops.com
Tue Nov 27 06:53:46 EST 2007


MonkeeSage a écrit :
> On Nov 27, 4:22 am, Bruno Desthuilliers
> 
>> You don't have to subclass function to define a callable type that
>> implements the descriptor protocol so it behaves just like a function in
>> the context of an attribute lookup.
> 
> I'm aware, and I understand that python's types (as with other duck-
> typed languages) are basically just an object's capabilities; I was
> just pointing out that, if needed (though I can't think of why
> offhand...mabye some kind of sandbox?), you can detect built-in
> functions.

Ok.

> Hmm...but then again, it seems that shadowing a built-in
> function still reports as it's type as FunctionType...

Of course (at least as long as you sahdow it with another function) - 
Why would it be otherwise ?






More information about the Python-list mailing list