[Python-Dev] PEP 362 minor nits

Steven D'Aprano steve at pearwood.info
Wed Jun 20 10:30:07 CEST 2012


On Tue, Jun 19, 2012 at 08:11:26PM -0400, Yury Selivanov wrote:

> So using the signature will be OK for 'Foo.bar' and 'Foo().bar', but
> not for 'Foo.__dict__['bar']' - which I think is fine (since
> staticmethod & classmethod instances are not callable)

There has been some talk on Python-ideas about making staticmethod and 
classmethod instances callable.

Speaking of non-instance method descriptors, please excuse this silly 
question, I haven't quite understood the implementation well enough to 
answer this question myself. Is there anything needed to make 
signature() work correctly with custom method-like descriptors such as 
this?

http://code.activestate.com/recipes/577030-dualmethod-descriptor



-- 
Steven


More information about the Python-Dev mailing list