From: Yukihiro Matsumoto Date: 2010-08-23T18:03:53+09:00 Subject: Re: assert "foo"[3] != "foo"[3,1]...revisited Hi, In message "Re: assert "foo"[3] != "foo"[3,1]...revisited" on Mon, 23 Aug 2010 17:51:02 +0900, timr writes: |I don't like that this passes |assert "foo"[3] != "foo"[3,1] | |Matz, you are so smart, but this does not follow the principle of |least surprise!!! こんなことはへんじゃないすか。 "foo"[3,1] is "" since when index is within the string, the sought length will be rounded to fit in the size. And 3 (which equals to the length of the string) is considered as touching the end of the string, so the result length is zero. And a tip for you; never mention PoLS again to persuade me. It's no use. If you have real trouble besides misunderstanding, let me know. matz.