[Python-ideas] Allow Profile() to be used as a context manager

Nick Coghlan ncoghlan at gmail.com
Wed Jan 25 11:52:45 CET 2012

On Wed, Jan 25, 2012 at 8:28 PM, David Townshend <aquavitae69 at gmail.com> wrote:
> Would that stop the profiler between calles though?  In Yuval's example,
> wouldn't  do_a_hard_but_i_dont_care_now_task be included in the profile
> then?

No, because the two profiling blocks aren't overlapping - the count
drops to zero between them so the profiler will be disabled for that


Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

More information about the Python-ideas mailing list