On Jan 3, 8:53 pm, Bryan Olson <fakeaddr...@nowhere.org> wrote: > If we add a parameter for the length of the list to which the slice is > applied, then inslice() is well-defined.
Cool! > I thought it would easy to write, Heh, I gave up on the example I mentioned above :) > but that was hours ago when I knew > less about Python slice indexing than I do now. And I thought I new a > bunch from writing a virtual slice class. Maybe you could write about what you learned in the docs? > I'm leaning towards mmanns' idea that this should be built in. Handling > all the cases is remarkably tricky. Even without testing your code, I agree. I suggest that you add this as a feature request to the tracker at http://bugs.python.org/. I hope Raymond Hettinger likes it and adds an islice version :) -- http://mail.python.org/mailman/listinfo/python-list