Pythons indentation.

Kirk Abbott (ka0p+@EDRC.CMU.EDU)
Sun, 10 Apr 1994 01:07:04 GMT

I have just finished building python on a Sparc10. Builds like a charm.
I am already getting annoyed with the syntax in interactive mode though.
Python sees it as 'a benefit' to use indentation rather than 'clumsy brackets'
for delimiting code. However picture the situation where your csh or sh
seg faults everytime that you forget to hit the space bar or tab key.

This is annoying !!! It is possible that I am doing something wrong but I dont
think so. Here is an example from page 19 of the tut.ps.
------------
ka0p% ./python
Python 1.0.1 (Apr 9 1994)
Copyright 1991-1994 Stichting Mathematisch Centrum, Amsterdam
>>> def fib(n):
... a, b = 0, 1
... while b <= n:
... print b,
Segmentation fault (core dumped)
ka0p%
----------------

whereas the following works:

-----------------
ka0p% ./python
Python 1.0.1 (Apr 9 1994)
Copyright 1991-1994 Stichting Mathematisch Centrum, Amsterdam
>>> def fib(n):
... a, b = 0, 1
... while b <= n:
... print b,
... a, b = b, a+b
...
>>> fib(2000)
1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597
-----------------

Apparently it thinks that the statement is finished without the indentation
and runs out of heap space (as it is an infinite loop). Am I correct here ?
Has any body experienced this ? Is there an easy hack so that I can use my
brackets :-)?

Looking forward to working with Python.

Kirk.