homepage

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 hagen
Recipients hagen
Date 2009年02月20日.13:10:17
SpamBayes Score 1.2604771e-05
Marked as misclassified No
Message-id <1235135420.93.0.617344393794.issue5330@psf.upfronthosting.co.za>
In-reply-to
Content
A C function or method call without keyword arguments gets reported by
the profiler as expected (in the line with "{method 'sort' of 'list'
object}"):
>>> cProfile.run("[].sort()")
 4 function calls in 0.000 CPU seconds
 Ordered by: standard name
 ncalls tottime percall cumtime percall filename:lineno(function)
 1 0.000 0.000 0.000 0.000 <string>:1(<module>)
 1 0.000 0.000 0.000 0.000 {built-in method exec}
 1 0.000 0.000 0.000 0.000 {method 'disable' of
'_lsprof.Profiler' objects}
 1 0.000 0.000 0.000 0.000 {method 'sort' of 'list'
objects}
However, once a keyword argument is given, the relevant line is missing:
>>> cProfile.run("[].sort(reverse=True)")
 3 function calls in 0.000 CPU seconds
 Ordered by: standard name
 ncalls tottime percall cumtime percall filename:lineno(function)
 1 0.000 0.000 0.000 0.000 <string>:1(<module>)
 1 0.000 0.000 0.000 0.000 {built-in method exec}
 1 0.000 0.000 0.000 0.000 {method 'disable' of
'_lsprof.Profiler' objects}
This happens with profile and cProfile in 2.6 and 3.0.
History
Date User Action Args
2009年02月20日 13:10:21hagensetrecipients: + hagen
2009年02月20日 13:10:20hagensetmessageid: <1235135420.93.0.617344393794.issue5330@psf.upfronthosting.co.za>
2009年02月20日 13:10:18hagenlinkissue5330 messages
2009年02月20日 13:10:17hagencreate

AltStyle によって変換されたページ (->オリジナル) /