SV: Python Productivity over C++
Stefan Franke
spamfranke at bigfoot.de
Sun Jun 18 17:47:18 EDT 2000
On Thu, 15 Jun 2000 23:28:39 GMT, hzhu at mars.localdomain (Huaiyu Zhu) wrote:
>>Ah, good point - try this variant - I switched to getattr() which
>>takes the inheritance into account (you could also write your own
>>recursive function that used Instance.__bases__ to look in the
>>superclasses).
Some thoughts:
Using callable(x) instead of "type(x) is types.Function/MethodType" would
make this still a bit more generic.
In its ZPublisher.mapply module, Zope uses Python's introspection features
to figure out and match function signatures.
Stefan
More information about the Python-list
mailing list