>From pubs22.si.com!uunet!cwi.nl!news Sun Apr 10 00:05:12 1994
To: uunet!cwi.nl!cwi.nl!python-list@pubs22.si.com
Sender: uunet!cwi.nl!python-list-request@pubs22.si.com
Subject: Pythons indentation.
X-Organization: Carnegie Mellon University
Content-Length: 1397
X-Lines: 46
[ stuff deleted ]
------------
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
-----------------
[stuff deleted]
----- End Included Message -----
I'm also running on SPARC10, SunOS 4.1.3.
Python 1.0.1 (Mar 28 1994)
Copyright 1991-1994 Stichting Mathematisch Centrum, Amsterdam
>>> def fib(n):
... a, b = 0, 1
... while b <= n:
... print b,
File "<stdin>", line 4
print b,
^
SyntaxError: invalid syntax
No seg fault here!
Which compiler did you use to build Python. Maybe your compiler is not up
to date. I used gcc-2.5.7.
==============================================================================
Michael Tibbs email: tibbs_michael@si.com
Smiths Industries Aerospace voice: 616-241-7572
4141 Eastern Ave SE FAX: 616-241-7533
Grand Rapids, MI 49518
============================================="OOP is no mistake."==============