Multi-argument append() is illegal

Alex alex at somewhere.round.here
Sat Mar 25 19:55:33 EST 2000


I don't know whether this has been mentioned, but along the same lines,
I noticed recently that the 'index', 'count' and 'remove' methods of
lists also treat multiple arguments as a tuple:

>>> l = map (None, range (10), range (10, 20))
>>> l.index (1, 11)
>>> l.count (1, 11)
1
>>> l.remove (1, 11)
>>> for t in l: print t
... 
(0, 10)
(2, 12)
(3, 13)
(4, 14)
(5, 15)
(6, 16)
(7, 17)
(8, 18)
(9, 19)
>>> 

This probably also wants changing.

Alex.



More information about the Python-list mailing list