On 12/07/2013 11:42 AM, Steven D'Aprano wrote:
>Are slices and subsequences transparently usable one for the other?
Of course not. They are completely different things. A slice has to be
applied to a sequence before you get a subsequence:
Right, thank you, Staven, that's the bit I missed.
[I knew about the common sense of slice in Python as a sysnonym of subsequence,
meaning a partial copy; so I thought this different sense I just discovered,
about slice _objects_ properly in Python, was about slice as commonly understood
in other languages (D, C++, many more); but this is yet another, third meaning!
;-). Like a slice sense2, but without pointer to the original object.]
They are more like (x)ranges, thus: an abstract representation of an interval.
Denis
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor