Peter Hansen wrote:
> It's not even clear that extend needs two lines:
>
> >>> s = range(5)
> >>> more = list('abc')
> >>> s[:] = s + more
> >>> s
> [0, 1, 2, 3, 4, 'a', 'b', 'c']
>
> Okay, it's not obvious, but I don't think s[:]=[] is really any more
> obvious as a way to clear the list.
>
> Clearly .extend() needs to be removed from the language as it is an
> unnecessary extension to the API using slicing
you just flunked the "what Python has to do to carry out a certain operation"
part of the "how Python works, intermediate level" certification.
</F>
--
http://mail.python.org/mailman/listinfo/python-list