Python questions from C/Perl/Java programmer

Alex Martelli alex at magenta.com
Mon Jul 24 15:45:37 EDT 2000


"ye, wei" <yw at alabanza.net> wrote in message
news:397C6F49.7BEBB207 at alabanza.net...
    [snip]
> problem in Python script, consider use 'vi', it's hard to write Python
    [snip]
> 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>/
?!

"Enclose (this syntactically complete part) within { }" is essentially
impossible to automate with vi, as you can't generally identify the
"syntactically complete part", but adding/removing tabs to/from lines
is just about what vi is *designed* for!-)

Others will no doubt address the more general issues raised by your
post (I'm pretty sure this theme is the one raised most often by
newcomers to this group), but, as an old vi-lover, I wanted to
ensure you that your hilarious joke was not missed!-)  [I use GVIM
these days, of course, getting python colorization and everything,
but the vi core of it is what I really get 99% out from!-)].


Alex






More information about the Python-list mailing list