Slicing behaviour vis a vis Python
Posted: Mon Apr 14, 2008 1:16 am
The doc alludes to cobra having slicing behaviour like Pythons which I have taken to meaning behaves exactly the same.
Unfortunately (from my point of view at least) it doesnt ,in that slice indexes outside the existing range generate Exceptions rather than
generating a valid result up to the range boundaries.
I'm wondering if that behaviour is an intentional difference from pythons and if so what your reasoning for it might be.
Unfortunately (from my point of view at least) it doesnt ,in that slice indexes outside the existing range generate Exceptions rather than
generating a valid result up to the range boundaries.
I'm wondering if that behaviour is an intentional difference from pythons and if so what your reasoning for it might be.