[Python-Dev] yeah! for Jeremy and Greg
Barry A. Warsaw
bwarsaw@cnri.reston.va.us
Tue, 28 Mar 2000 19:46:11 -0500 (EST)
Uh oh. Fresh CVS update and make clean, make:
-------------------- snip snip --------------------
Python 1.5.2+ (#20, Mar 28 2000, 19:37:38) [GCC 2.8.1] on sunos5
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> def sum(*args):
... s = 0
... for x in args: s = s + x
... return s
...
>>> class Nums:
... def __getitem__(self, i):
... if i >= 10 or i < 0: raise IndexError
... return i
...
>>> n = Nums()
>>> for i in n: print i
...
0
1
2
3
4
5
6
7
8
9
>>> sum(*n)
Traceback (innermost last):
File "<stdin>", line 1, in ?
SystemError: bad argument to internal function
-------------------- snip snip --------------------
-Barry