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 terry.reedy
Recipients georg.brandl, hagen, r.david.murray, terry.reedy
Date 2011-09-16.18:02:23
SpamBayes Score 1.0410801e-08
Marked as misclassified No
Message-id <1316196144.98.0.883116982779.issue12953@psf.upfronthosting.co.za>
In-reply-to
Content
Range and most of the itertools functions are exposed at the Python level as iterator classes. (But since C does not have classes, they must be C-level functions!) The int 'class' is also not profiled.

I think this is wrong behavior. Int and range used to be non-class functions, which means the output of profile must have once included them (in 2.7 for range). Classes *are* functions in the wider sense, as used in the title of the 'Builtin functions'. User callables can also switch implementations. A closure might be replaced by a class; a class might be replaced by a factory function.

One could argue that this is such a long time bug (probably) that it should be handled as a feature request. The docs are a bit vague as to what is profiled, except that 26.3.1. Introduction to the profilers
does refer to 'C-level functions'.

However, the more important issue, at present, is keeping profile and cProfile, which wraps lsprof, in sync.
History
Date User Action Args
2011-09-16 18:02:25terry.reedysetrecipients: + terry.reedy, georg.brandl, hagen, r.david.murray
2011-09-16 18:02:24terry.reedysetmessageid: <1316196144.98.0.883116982779.issue12953@psf.upfronthosting.co.za>
2011-09-16 18:02:24terry.reedylinkissue12953 messages
2011-09-16 18:02:23terry.reedycreate