Python Rocks!

Stefan Schwarzer s.schwarzer at ndh.net
Wed Jan 19 20:34:27 EST 2000


Hello tye4

(Do you have a real name or did I miss it? If yes, sorry.)

tye4 schrieb:
> Actually, I use something like:
> 
> if x == 10:
>     print 'x is 10'
> #end if
> print 'Hello world'
> 
> I'm more concerned with how many maintenance headaches will result if I were
> to accidently add or delete a space on a line.

Like others I think your problem is not the language but your editing
tool(s). For the code I write alone, I always use spaces (including
such that are inserted by the tab key). One time I had problems when
I edited code from someone else and ran into those troubles you see.
However, after searching the cause for the error for a while, I
selected  :set list  in Vim and saw clearly where tab characters were
and changed them to the equivalent number spaces (for this code).
>From then, I never had such problems, - because I am aware of them
now!

> Also, I would to be very
> careful and choosy about what editor to use.. Some editors expand tabs while
> others don't.. What indentation you see in one editor is sometimes different
> to what is seen in another...

In any good editor (TM) ;-) you can choose whether to insert tab
characters or not. And as said above, it is a much lesser problem _if
you know about its possibility_.

> How hard can it be to add 'end' indicators to the language.. If these end
> indicators are added, the language would still be backward compatible. I
> can't believe nobody has fixed this for so long.

I don't think that this should be "fixed". I've become used to Python
rather quick and I like it very much. Concerning the design of the
language I think there are _many_ things in Python that make
"maintenance headaches" _go away_ (among them the use of indentation
for blocks).

I don't say that Python is completely free of design errors but I found
that Python is so well-designed that I write code much faster, more
elegant (IMHO) and with less errors than with any other languages
that I used before (e. g. Pascal, C++ and Perl).

alt.religion.python-ly y'rs ;-)
 Stefan



More information about the Python-list mailing list