Multi-argument append() is illegal

Tim Peters tim_one at email.msn.com
Sat Mar 25 20:55:49 EST 2000


[Alex]
> 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:
> ...
> This probably also wants changing.

Yes, these were disallowed by the same patch that disallowed multi-arg
list.append.  Nobody mentioned index/etc because there were no known
instances of that in real code; multi-arg append unfortunately showed up in
some very early modules in the std distribution, and appeared to get copied
widely by people who listened harder to the compiler's silence than the
documentation's screams <wink>.

sometimes-better-not-to-make-a-mistake-in-the-first-place-ly y'rs  - tim






More information about the Python-list mailing list