PEP scepticism

Maciej Pilichowski macias at bp.com.pl
Tue Jul 3 14:36:44 CEST 2001


On Sun, 01 Jul 2001 10:06:14 -0400, Roy Smith <roy at panix.com> wrote:

>Having now used python for about 4 years, I still think 
>indentation-for-grouping was a dumb idea.  The problem is that it is just 
>too easy to add or delete whitespace by accident (and without noticing), 
>especially when cutting and pasting hunks of code from one place to 
>another.

In languages like Pascal and C I indent all my code to get clear look.
And I don't remember if I make mistake putting one less or one more
space in all those years. Besides:

		for i:=1 to 10 do
begin
	mytab.first;
while not mytab.eof do
				begin
sum:=sum+mytabfee.ascurrency;
...

It sure will compile but is it an advantage? You have to correct this
mess anyway -- the only thing which is useless here is pairs of
begin-end.

And what's more -- pure indentation means full WYSIWYG. In such cases

if x==y:
  if q==w:
    print x
else:
  print y

you don't have to remember rules of if-else joining. You _see_ it and
that's enough.

Recently I was really seriously mislead by omitting ";" in my Pascal
code in last line of "case" but just before "else". This type of
mistakes are not possible in Python /thank you Guido van Rossum :-))/.

have a nice day
bye

-- 
Maciej "MACiAS" Pilichowski
http://www.torun.pdi.net/~macias/

z a k u p i e : pisma Komputer: 3/86,4/87



More information about the Python-list mailing list