Storing objects required by functions.
Christos TZOTZIOY Georgiou
tzot at sil-tec.gr
Tue Dec 30 23:20:56 EST 2003
On 31 Dec 2003 04:07:01 GMT, rumours say that bokr at oz.net (Bengt
Richter) might have written:
>>It's much more general to use new.instancemethod. See:
>I think I did use new.instancemethod, through another door ;-)
No doubt :) . *I* wasn't clear: new.instancemethod accepts any callable
I throw to it, while not all callables have a __get__ method...
>>>> foom(1,2,3,hi='Hello')
> self='dummy self', args=(1, 2, 3), kw={'hi': 'Hello'}
>
>I didn't make voodoo out of it though. Interesting, but all that nested
>calling at call-time seems like it would make for a performance hit? Unless maybe it is
>all packed up in slots that C can get to very fast??
Actually, I think that most overhead lies in creating a frame object for
the execution of a python callable. Calling C functions is fastest. I
didn't spot any delays, but I didn't search thoroughly ;)
--
TZOTZIOY, I speak England very best,
Ils sont fous ces Redmontains! --Harddix
More information about the Python-list
mailing list