Any tools to print source code call hierarchy
Bengt Richter
bokr at oz.net
Sun Sep 7 13:14:00 EDT 2003
On 7 Sep 2003 03:21:25 -0700, llothar at web.de (Lothar Scholz) wrote:
>Simon Burton <simonb at webone.com.au> wrote in message news:<pan.2003.09.06.23.51.35.802469 at webone.com.au>...
>> 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
>else:
> 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 ;-)
Regards,
Bengt Richter
More information about the Python-list
mailing list