Message144144
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. |
|
Date |
User |
Action |
Args |
2011-09-16 18:02:25 | terry.reedy | set | recipients:
+ terry.reedy, georg.brandl, hagen, r.david.murray |
2011-09-16 18:02:24 | terry.reedy | set | messageid: <1316196144.98.0.883116982779.issue12953@psf.upfronthosting.co.za> |
2011-09-16 18:02:24 | terry.reedy | link | issue12953 messages |
2011-09-16 18:02:23 | terry.reedy | create | |
|