[Python-Dev] s/hotshot/lsprof

Jim Jewett jimjjewett at gmail.com
Mon Nov 21 22:36:33 CET 2005


Jeremy Hylton jeremy at alum.mit.edu
>  Should lsprof be added to the standard distribution?
>  Should hotshot be removed from the standard distribution?

>  These two aren't at all related, unless you believe that two is the
>  maximum number of profiles allowed per Python distribution.

One is a better number.

("There should be one-- and preferably only one --obvious way to do it.")

Adding a second (let alone third) module to the stdlib to do
the same thing just makes the documentation bulkier,
and makes the "where do I start" problem harder for beginners.

And yes, I think beginners are the most important audience
here; anyone sufficiently comfortable with python to make an
intelligent choice between different code profilers is probably
also able to install 3rd-party modules anyway.

Note that I have no objection to (and would like to see) a
section in the module documentation saying "This is just
one alternative; many people prefer XXX because of YYY".
This mention would provide enough endorsement for
anyone ready to choose another profiler.

Even putting the alternatives into a single stdlib package
(and making it clear that they are alternatives, rather than
complementary building blocks) is better than simply
leaving them all scattered throughout the stdlib as
roll-the-dice-to-pick alternatives.

-jJ


More information about the Python-Dev mailing list