Comment 2 for bug 947267

Revision history for this message
Duncan McGreggor (oubiwann) wrote :

So, in general, the Python community (in particular, those well-established in the language like the author, Guido, Alex Martelli, etc.) embrace simple Python code and encourage this in developers who create projects with the language.

What does "simple" mean?

 * too much indented code is frowned upon: it's hard to maintain and read, instead break it into logical bits
 * don't throw all code into a single file - split things out into different modules or subpackages
 * don't throw all your code into a single class; break it up by area of concern, logical responsibility, etc.
 * write smaller functions/methods, and more of them

All of these boil down to this: make sure your code is not doing to much. If it is, it's going to be hard for new-commers to understand and adopt, help maintain, etc. It's going to make code merges more challenging, as there will be a greater probability of collisions due to everything being in one files vs. several.

So, to answer your question in particular: we want newcomers to know *exactly* where the Twisted code is, and know where it's called. This will be easier to do if we split it out better. We'll also gain in the process, regarding to the points made earlier in this comment :-)