Remarks to Python 2.3

Aahz aahz at pythoncraft.com
Wed Sep 18 22:29:43 CEST 2002


Normally, I tell people posting to python-dev that they're in the wrong
place and should go to c.l.py.  However, this time, I think the reverse
suggestion is in order: you should post your questions to python-dev.

In article <20020918222421.328088eb.use-net at schabi.de>,
Markus Schaber  <use-net at schabi.de> wrote:
>
>I studied http://python.org/dev/doc/devel/whatsnew/contents.html and was
>very impressed - you manage to get python even more fascinating with
>every release.
>
>I especially like enumerate() and Bool.
>
>But I have some remarks:
>
>- Mutable sets support some in-place operations - should those, just as
>the in place operations on lists, like sort(), return None instead of
>the new list to make clear that they are in place operations and for the
>sake of consistency?
>
>- When replacing list elements using the extended slice syntax - e. G.
>in a[::2] = range(0, -2, -1) - the left side must have exactly the same
>numer of elements as the right side. So, to cite the example, a[::2] =
>range(3) is illegal for a=[0, 1, -1, 3]. 
>
>Now I could image that it makes sense to allow one single additional
>element to be added to the list in case only the step is specified and
>the operation doesn't produce a gap. So the given example above would be
>valid, giving a sequence of five elements, whereas with a=[0, 1, 2] it
>would stay illegal (as it would produce a gap). a[0:3:2]=range(3) would
>stay illegal as it explicitly specifies the length of the range,
>a[0:3:5]=range(3) could be allowed.


-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

Project Vote Smart: http://www.vote-smart.org/



More information about the Python-list mailing list