Message302709
> I don't know. What's the point of optimizing `array.array.__len__(obj)`? People usually call `len(obj)` for that...
Right, type.method(self) is less than common than self.method().
I looked at the stdlib. I found that the following method are called using wrapper descriptors:
* object.__repr__(self)
* object.__getattribute__(self, name)
* _asyncio.Future.__del__(self)
* int.__str__(obj)
* etc.
But it seems like such calls are rare compared to other kinds of function calls.
--
By the way, _PyMethodDescr_FastCallKeywords() is only called from call_function() in Python/ceval.c. It's not used in Objects/call.c. Maybe we should use it there as well? It seems like this is a question about tracing. But maybe we can copy/paste the code from call_function()? |
|
Date |
User |
Action |
Args |
2017-09-21 16:46:42 | vstinner | set | recipients:
+ vstinner, pitrou, methane, serhiy.storchaka |
2017-09-21 16:46:42 | vstinner | set | messageid: <1506012402.13.0.49580004395.issue31543@psf.upfronthosting.co.za> |
2017-09-21 16:46:42 | vstinner | link | issue31543 messages |
2017-09-21 16:46:42 | vstinner | create | |
|