[New-bugs-announce] [issue17197] c/profile refactoring

Giampaolo Rodola' report at bugs.python.org
Tue Feb 12 23:40:09 CET 2013

New submission from Giampaolo Rodola':

profile and cProfile modules define the same utility functions (run() and runctx()) which use the same code except the profiler class.
Considering that we're going to add 2 new utility functions (runcall() and runblock(), see issue9285 and issue17130) I think we should refactor the code in order to avoid this code duplication.
Patch in attachment does that.
The approach I came up with looks a bit hackish though so I'd like to get some feedback. Is it acceptable?

files: profile-refactoring.diff
keywords: patch
messages: 181980
nosy: georg.brandl, giampaolo.rodola, pitrou
priority: normal
severity: normal
status: open
title: c/profile refactoring
Added file: http://bugs.python.org/file29053/profile-refactoring.diff

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list