One module per class, bad idea?

Paddy paddy3118 at netscape.net
Tue Dec 12 11:50:10 EST 2006



On Dec 12, 8:29 am, "Matias Jansson"
<matias.jans... 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)?
Hi,
This is one of the cases where Java and C# common practice diverge from
Pythons.
You might try looking at the source to some of the standard modules to
see how things are done in Python.

- Paddy.




More information about the Python-list mailing list