On 30 Aug 2013 19:07, <niuba...@gmail.com> wrote: > > I'm starting a small project coding in Python as I learn the ropes. As the project grows bigger, there are more and more overlapping and even redundant methods. For example, several classes have a checkAndClean_obj_state() method. If just one or two such classes, it is easy to analyze the behaviour of them and design the optimal interaction for all objects. However, when there are many of such classes, exactly at what point to invoke check and clean behaviour becomes a little blurred. There is a desperate need for generalizing and documenting the behaviour of each such class, preferably in a flowchart. I'm currently doing the flowchart manually but the job becomes a bit overwhelming. > > I wonder what Python pros are using for analyzing and documenting classes/functions behaviours and interactions? Is UML the only way? Personally I found UML is a bit overkill for a one person project, but I'm not sure if it is the right direction. I'd appreciate any insight. Many thanks.
I can't say I have ever used any tool for documenting python automatically. Human written documentation is always best. As for graphs and all, YMMV, but I've found that paper is best for expressing your code structure. I have looked into tools which generate graphs of your imports, but I found none of them satisfactory. There are a lot of problems parsing python due to its dynamic nature. In the end I decided to sit and read my codebase as I drew.
-- http://mail.python.org/mailman/listinfo/python-list