How to find unused methods

Christos TZOTZIOY Georgiou tzot at
Wed Dec 22 14:59:15 CET 2004

On 22 Dec 2004 10:27:58 +0100, rumours say that Martin Drautzburg
<martin.drautzburg at> might have written:

>Is there an elegant way for finding unsent methods as in Smalltalk ? 
>I am aware of the fact that due to pythons dynamic typing, no tool in
>the world can find ALL unsent methods (same in Smalltalk). But finding
>the most obvious ones would already be of some help.

If you don't mind *running* your program, profile it.  Or wrap all your
methods in call counting ones.  I think you will find lots of recipes
how to automagically do the latter, especially in the decorator section
of your favourite site :)
TZOTZIOY, I speak England very best.
"Be strict when sending and tolerant when receiving." (from RFC1958)
I really should keep that in mind when talking with people, actually...

More information about the Python-list mailing list