Any tools to print source code call hierarchy

Bengt Richter bokr at
Sun Sep 7 19:14:00 CEST 2003

On 7 Sep 2003 03:21:25 -0700, llothar at (Lothar Scholz) wrote:

>Simon Burton <simonb at> wrote in message news:<pan.2003. at>...
>> hmmm... I think (some) static analysis may be possible. The main
>> thing to exclude is eval/exec but even then, yes you're right, some
>> programs would just have to be run to find out what they do.
>Whats with code like:
>if foo:
>   def myfunc():
>       ... do something
>   def myfunc():
>       ... calling your_func()
>A Language where the program calling hierarchie depends on runtime
>calculations is not able to provide good refactoring tools or static
>flow analysis. This is the huge difference to a language like
>Smalltalk where we live in an image.
>And if you say that this is a hack, then you are making a big mistake,
>look at currently used code and you will find so much uses of this
>style (or even worse styles) that it seems to be a common paradigm.

Which only begins to hint at what is possible with metaclasses ;-)

Bengt Richter

More information about the Python-list mailing list