include "apythonscript.py"

Duncan Booth duncan.booth at invalid.invalid
Mon May 9 11:55:21 EDT 2005


 wrote:

> Ah damn , that's the way.
> 
> And what if you have a very big class and want to include some class
> functions ?
> 
> class ThisIsAClass:
>     def __init__(self):
> 
>      Here I want to import a class def
> 

The usual way to handle that would be to not write a 'very big class' at 
all: create a lot of comparatively simple classes and use either 
inheritance or aggregation as appropriate to combine them.

You will find this makes your life much easier all round.

What you are doing sounds like a classic case of 'The Blob'. See 
http://www.antipatterns.com/briefing/sld024.htm



More information about the Python-list mailing list