Why NOT only one class per file?
Nate Finch
nate.finch at gmail.com
Thu Apr 5 15:25:06 EDT 2007
On Apr 5, 10:48 am, Bruno Desthuilliers <bruno.
42.desthuilli... at wtf.websiteburo.oops.com> wrote:
> Nate Finch a écrit :
>
> > So, here's a view from a guy who's not a python nut and has a long
> > history of professional programming in other languages (C++, C, C#,
> > Java)
>
> There are quite a few professional programmers here with experience on
> medium to large to huge projects with different languages, you know.
Sorry, I meant to go back and edit that phrase to sound less
condescending. I know there are a lot of professional programmers on
here, and I didn't mean to imply otherwise. It wasn't supposed to be
a contrast to everyone, just introducing myself.
I totally agree with you... there's a balance between too many files
and files that are too large.
As to the guy who writes 1000+ line classes .... dude, refactor some.
You're trying to make the class do too much, almost by definition.
We have *some* classes that big, and they're marked as "needs
refactor". It's certainly not a common occurance, though. Usually
they're UI classes, since they require a lot of verbose positioning of
elements and hooking of events.
And while people are reading this thread, let me plug my other thread,
asking about absolute_import. I'd really love some help :)
-Nate
More information about the Python-list
mailing list