a small problem
knotwell at my-deja.com
knotwell at my-deja.com
Tue Jan 11 19:06:50 EST 2000
More information about the Python-list mailing list
Tue Jan 11 19:06:50 EST 2000
- Previous message (by thread): a small problem
- Next message (by thread): a small problem
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello all-- Is the following a bug? >>> q = [(1,'dd'),(2,'ddd'),(3,'ddddd')] >>> reduce(lambda x,y: x[0] + y[0],q) Traceback (innermost last): File "<stdin>", line 1, in ? File "<stdin>", line 1, in <lambda> AttributeError: __getitem__ Meanwhile, map(lambda x: x[0],q) --> [0,1,2] as one would expect. Similarly, filter appears to work as well. If this isn't a bug, why should reduce behave differently than filter and map? Thanks. --Brad Sent via Deja.com http://www.deja.com/ Before you buy.
- Previous message (by thread): a small problem
- Next message (by thread): a small problem
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list