software design question

Bengt Richter bokr at oz.net
Thu Feb 12 14:39:19 EST 2004


On Tue, 10 Feb 2004 23:47:12 -0800, Josiah Carlson <jcarlson at nospam.uci.edu> wrote:

>> Moreover, I feel much easier to edit simultaneously 
>> three or four buffers than to navigate back and forth on a very long single 
>> buffer.
>
>Depending on the features of your editor, going to different locations 
>in the current buffer (even offset by many lines) can be arbitrarily 
>trivial.  When you have a source tree, you are a double-click away from 
>any class/function/method (or even properly-formed comments, depending 
>on the editor support).  For those cases when keyboards shortcuts are 
>convenient, some editors have per-line bookmarks that allow you to hop 
>to often-used code portions very quickly.
>
>I'm sure all of this can be done with Emacs (perhaps even Vim), if you 
>know how to do it.
>
>
>> P.S. once I computed the average lenght of modules in the standard library.
>> The result was something like 200 lines.
>
>Sounds like a histogram is in order.  Maybe I'll do it this weekend when 
>I have the time.
>
A quick data point:

 >>> import os
 >>> wc = os.popen(r'wc D:\Python23\Lib\*py').readlines()
 >>> sum([int(x.split()[0]) for x in wc[:-1] if x])/float(len(wc)-1)
 412.61621621621623
 >>> print wc[-1]
       76334     250898    2657018       Totals

Gotta go...

Regards,
Bengt Richter



More information about the Python-list mailing list