On Dec 15, 11:48 pm, Brendan Miller <catph...@catphive.net> wrote: > I was thinking you'd want something like random access iterators in > c++, or pointers in c, to write typical in place algorithmic code. To > me, something like non-copying slices (maybe you'd call it a list > view?) would seem functionally similar and maybe more pythonic.
My general answer to the question, "Has anyone done any work in Python to get a certain feature that we have in C++?, is, "There's little demand for many features of C++ because they are actually workarounds for the language's poor expressibility". I'd say that's kind of the case here. C++ is poorly expressive (container operations are often an excercise in line-noise-management), and values fine-tuned optimization. So it makes sense to offer things like mutator views that reduce the number of container operations needed, and avoids copying. Python expresses container operations succinctly and clearly, and doesn't value performance as much. Copying and replacing is good enough most of the time, so there's less demand for things like mutator views. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list