One module per class, bad idea?

Kent Johnson kent at kentsjohnson.com
Mon Dec 25 11:17:21 EST 2006


Carl Banks wrote:
> Kent Johnson wrote:
>> Carl Banks wrote:
>>> Now, I think this is the best way to use modules, but you don't need to
>>> use modules to do get higher-level organization; you could use packages
>>> instead.  It's a pain if you're working on two different classes in the
>>> same system you have to keep switching files; but I guess some people
>>> prefer to switch files rather than to scroll for some reason.
>> That would be me. I strongly prefer to switch files rather than scroll.
>> I use an editor that makes it easy to switch files. For me it is much
>> easier to switch between files than to scroll between two parts of a
>> file, and I don't lose my place when I switch back. I like to be able to
>> see things side by side.
> 
> Man, I don't know you do it.
> 
> Say I'm sitting there concentrating on programming something, and I see
> that I'll have to make a change in another file.  All of a sudden, I
> have to recall some filename out of thin air.  Totally breaks my train
> of thought, sometimes I space out trying to think of it because I have
> to cold-start an entirely different part of my brain.  It's less of a
> mental distraction to just scroll.

But then to go back to where you were, you have to scroll back and find 
your place. For me, just a click or keystroke to restore the last file 
with the cursor or selection exactly where I left it. And if I am going 
back and forth between the two, each switch is equally easy after the 
first (opening the file).

> (BTW, any decent editor will let you view different positions of the
> same file side-by-side.)

Right, at a cost of showing you half as much of the one you care about.

Anyway, I'm not trying to convince anyone to change, just pointing out 
that there are different styles of editing that make sense to those who 
use them, if not to outside observers ;-)

Kent



More information about the Python-list mailing list