Python questions from C/Perl/Java programmer

Olivier Dagenais olivierS.dagenaisP at canadaA.comM
Tue Jul 25 11:26:43 EDT 2000


PythonWin ( http://starship.python.net/crew/mhammond/ ) makes skipping
blocks of code easy with an editor that "folds" similarily-indented code.
(check out the screenshot at http://www.scintilla.org/ )

It's-amazing-how-easy-a-language-gets-once-you-have-a-good-editor-ly y'rs..

--
----------------------------------------------------------------------
Olivier A. Dagenais - Carleton University - Computer Science III


"Samuel Scarano" <srs25 at cornell.edu> wrote in message
news:397DA68A.8153C672 at cornell.edu...
> > > e.g. In the following example, If you want to added a new 'if' between
> > > line 1 and 2, you have to add TAB from Line 2 to 199,
> > > it's difficult to make sure you don't make mistake. (The case may be
> >
> > You ARE joking, right?  If you hadn't mentioned vi, I would still
> > be doubtful, but, *with* vi, what can POSSIBLY be easier than
> >     :2,199s/^/<tab>/
> > ?!
>
> I'll tell you what's easier:
> 197>
>
> (although in reality, you would know the line number, so you would say
> something like
>
> ma^f^f^f^f>'a
>
> I'm not posting this just to brag/advtertize/proselytize WRT vi or vim;
> rather, I think it's important to point out that good programmer's editors
> make it easy to control tabs over many lines, so ensuring that python code
> is parsed correctly is really not a problem.
>
> In fact, you have the converse assurance -- that the code you see (in
> particular, code written by many people over many years) will be indented
> correctly. Wish I could say the same for the C code where I work....
>
> On the other hand, I will say this: the squiggly braces around blocks in
> C-influenced programming languages are nice for quickly locating the
> opposite boundary of a block (esp. functions). There have been times when
I
> wanted to skip to the end of along function and wished I could just use
> vim's "%" command.
>
> --
> Samuel R. Scarano                        "Due to circumstances beyond my
> Cornell University undergraduate         control, I am master of my fate
> <srs25 at cornell.edu>                      and captain of my soul."
> http://people.cornell.edu/pages/srs25/             -- Ashleigh Brilliant





More information about the Python-list mailing list