Why NOT only one class per file?

Steven Howe howe.steven at gmail.com
Thu Apr 5 03:55:50 EDT 2007


Dennis Lee Bieber wrote:
> On 4 Apr 2007 14:23:19 -0700, "Chris Lasher" <chris.lasher at gmail.com>
> declaimed the following in comp.lang.python:
>
>   
>> 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.
>>
>>     
> 	As I recall, Java essentially doesn't offer a CHOICE... So I'd
> consider any argument that "one per file" is best to be flawed if based
> upon Java practice. After all, if one can not even experiment with other
> ways, how can one really evaluate the options? {and I consign Perl to
> realms described by Dante}
>   
On class per file was easier to do when Java was developed (remember it 
was develop to control
vending machines; scary. Reminds me of the movie 'Tron'). The desktop 
computer for Sun 
was an IPC workstation.  Nice but no balls and no good editors that 
could have 24+ tabs open or
 a way to 'close' sections of coherent text (which are common in my 
preferred editor, Komodo).

So your friend is arguing the past. Ask him if he's a Republican too or 
needs a serious reboot.
I have a good pair of boot to give him a kick in the ass (Democrats 
would need a kick in the head
to reset; we all know what organ Republican think with).
sph





More information about the Python-list mailing list