One module per class, bad idea?

Jorgen Grahn grahn+nntp at snipabacken.dyndns.org
Fri Dec 15 10:53:38 EST 2006


On Tue, 12 Dec 2006 09:29:17 +0100, Matias Jansson <matias.jansson at carmenconsulting.com> wrote:
> I come from a background of Java and C# where it is common practise to have 
> one class per file in the file/project structure. As I have understood it, 
> it is more common practice to have many classes in a Python module/file. 
> What is the motivation behind it, would it be a bad idea to have a guideline 
> in your project that promotes a one class per file structure (assuming most 
> of the programmers a background similar to mine)? 

Never mind their background; think about their future ;-)

Besides, I think you have plenty of C and C++ hackers around, too.

Seriously, I agree with what F Lundh wrote elsewhere in the thread; no need
to repeat it here.

/Jorgen

-- 
  // Jorgen Grahn <grahn@        Ph'nglui mglw'nafh Cthulhu
\X/     snipabacken.dyndns.org>  R'lyeh wgah'nagl fhtagn!



More information about the Python-list mailing list