Why NOT only one class per file?

Bart Willems b.r.willems at gmail.com
Fri Apr 6 17:07:17 CEST 2007

Steven D'Aprano wrote:
> On Wed, 04 Apr 2007 14:23:19 -0700, Chris Lasher wrote:
>> A friend of mine with a programming background in Java and Perl places
>> each class in its own separate file in . I informed him that keeping
>> all related classes together in a single file is more in the Python
>> idiom than one file per class. He asked why, and frankly, his valid
>> question has me flummoxed.
> Hah! Writing one class per file is for wimps! When I program, I write one
> *method* per file, then import them and build the class at runtime.
> I have a friend who writes one *line* per file, then pulls them all
> together with exec(), but that's just being stupid.
I guess you're one of those sissies who uses EDLIN as an editor.

REAL programmers use COPY CON: ... :)

More information about the Python-list mailing list