This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients methane, pitrou, serhiy.storchaka, vstinner
Date 2017-09-21.16:46:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1506012402.13.0.49580004395.issue31543@psf.upfronthosting.co.za>
In-reply-to
Content
> 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()?
History
Date User Action Args
2017-09-21 16:46:42vstinnersetrecipients: + vstinner, pitrou, methane, serhiy.storchaka
2017-09-21 16:46:42vstinnersetmessageid: <1506012402.13.0.49580004395.issue31543@psf.upfronthosting.co.za>
2017-09-21 16:46:42vstinnerlinkissue31543 messages
2017-09-21 16:46:42vstinnercreate