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.