From: Robert Klemme Date: 2006-06-12T05:39:35+09:00 Subject: Re: Substrings by Position. 2006/6/11, Charlie : > Robert Klemme wrote: > > 2006/6/11, Charlie : > >> Hi, > >> > >> Just a logic question about substrings by position. > >> > >> foo = "012345678" > >> foo[5,1] #-> "5" > >> foo[-4,2] #-> "56" > >> foo[-3,2] = "" #-> "0123458" > > > > What version are you on? > > 1.8.4 > > You have probably missed out something, its foo[-3,2] = "" not > foo[-3,2] Right. But with assignment I would find it even more irritating to have reversal - because the only thing that would make sense is to apply the reversal to the assigned string - and this is extremely unobvious. > I just thought that if the current behaviour is so useful, then it'll > be equally useful to have an equal and opposite behaviour. It's just > unnatural that things can only go one direction. Just a thought. I don't subscribe to this general statement. Program code also flows only one direction and it would be more than unnatural to have it both ways. Kind regards robert -- Have a look: http://www.flickr.com/photos/fussel-foto/