Re: Why Python does *SLICING* the way it does??

2005-04-28 Thread Bjrn Lindstrm
Antoon Pardon [EMAIL PROTECTED] writes: The problem is that the fields in lst are associated with a number that is off by one as they are normally counted. If I go and ask my colleague which field contains some specific data and he answers: the 5th, I have to remind my self I want lst[4]

Re: Why Python does *SLICING* the way it does??

2005-04-22 Thread Antoon Pardon
Op 2005-04-21, Dan Bishop schreef [EMAIL PROTECTED]: Antoon Pardon wrote: Op 2005-04-21, Steve Holden schreef [EMAIL PROTECTED]: [EMAIL PROTECTED] wrote: ... Along the same lines, I think the REQUIREMENT that x[0] rather than x[1] be the first element of list x is a mistake. At least the

Re: Why Python does *SLICING* the way it does??

2005-04-22 Thread Reinhold Birkenfeld
Reinhold Birkenfeld wrote: Other possibility, probably faster when almost all keys in the range are in the dictionary: class sdict(dict): def __getitem__(self, index): if isinstance(index, slice): d = {} for key in xrange(slice.start, slice.stop,

Re: Why Python does *SLICING* the way it does??

2005-04-22 Thread Peter Hansen
Rocco Moretti wrote: Steve Holden wrote: The principle of least surprise is all very well, but needless surprise of newbies is a dangerous criterion to adopt for programming language design and following it consistently would lead to a mess like Visual Basic, which grew by accretion until

Re: Why Python does *SLICING* the way it does??

2005-04-21 Thread Antoon Pardon
Op 2005-04-20, Bill Mill schreef [EMAIL PROTECTED]: On 20 Apr 2005 13:39:42 GMT, Antoon Pardon [EMAIL PROTECTED] wrote: Op 2005-04-20, Bill Mill schreef [EMAIL PROTECTED]: You write this af if other solutions can't be consistent. Propose one, and I won't write it off without thinking, but

Re: Why Python does *SLICING* the way it does??

2005-04-21 Thread Antoon Pardon
Op 2005-04-20, Roy Smith schreef [EMAIL PROTECTED]: Antoon Pardon [EMAIL PROTECTED] wrote: Op 2005-04-20, Roy Smith schreef [EMAIL PROTECTED]: Antoon Pardon [EMAIL PROTECTED] wrote: Personnaly I would like to have the choice. Sometimes I prefer to start at 0, sometimes at 1 and other times

Re: Why Python does *SLICING* the way it does??

2005-04-21 Thread Dan Bishop
[EMAIL PROTECTED] wrote: What languages besides Python use the Python slicing convention? Java uses it for the substring method of strings. In C starting at 0 may be justified because of the connection between array subscripting and pointer arithmetic, but Python is a higher-level language

Re: Why Python does *SLICING* the way it does??

2005-04-21 Thread Antoon Pardon
Op 2005-04-20, Peter Hansen schreef [EMAIL PROTECTED]: Terry Hancock wrote: However, I used to make off by one errors all the time in both C and Fortran, whereas I hardly ever make them in Python. This should probably be the overriding concern in this case. I can't remember the last time

Re: Why Python does *SLICING* the way it does??

2005-04-21 Thread Antoon Pardon
Op 2005-04-20, Terry Hancock schreef [EMAIL PROTECTED]: On Wednesday 20 April 2005 07:52 am, Antoon Pardon wrote: Personnaly I would like to have the choice. Sometimes I prefer to start at 0, sometimes at 1 and other times at -13 or +7. Although I would classify that as a rare use case. So,

Re: Why Python does *SLICING* the way it does??

2005-04-21 Thread Raymond Hettinger
[Antoon Pardon] I don't see why the start index can't be accessible through a method or function just like the length of a list is now. My favourite would be a range method so we would have the following idiom: for i in lst.range(): do something with lst[i] After going to all that

Re: Why Python does *SLICING* the way it does??

2005-04-21 Thread Antoon Pardon
Op 2005-04-20, Terry Hancock schreef [EMAIL PROTECTED]: On Wednesday 20 April 2005 12:28 pm, Roy Smith wrote: Terry Hancock wrote: I used to make off by one errors all the time in both C and Fortran, whereas I hardly ever make them in Python. Part of the reason may be that most loops

Re: Why Python does *SLICING* the way it does??

2005-04-21 Thread Ron
[EMAIL PROTECTED] wrote: Many people I know ask why Python does slicing the way it does. Can anyone /please/ give me a good defense/justification??? I'm referring to why mystring[:4] gives me elements 0, 1, 2 and 3 but *NOT* mystring[4] (5th element). Many people don't like idea that 5th

Re: Why Python does *SLICING* the way it does??

2005-04-21 Thread Paul Rubin
Antoon Pardon [EMAIL PROTECTED] writes: I sometimes think python should have been more explicite here, using a marker for the start-index and end-index, may '^' and '$'. So if you wanted the last element you had to write: lst[$] And for the next to last element: lst[$ - 1] I like

Re: Why Python does *SLICING* the way it does??

2005-04-21 Thread Antoon Pardon
Op 2005-04-21, Raymond Hettinger schreef [EMAIL PROTECTED]: [Antoon Pardon] I don't see why the start index can't be accessible through a method or function just like the length of a list is now. My favourite would be a range method so we would have the following idiom: for i in

Re: Why Python does *SLICING* the way it does??

2005-04-21 Thread Raymond Hettinger
[Antoon Pardon] I don't see why the start index can't be accessible through a method or function just like the length of a list is now. My favourite would be a range method so we would have the following idiom: for i in lst.range(): do something with lst[i] After going

Re: Why Python does *SLICING* the way it does??

2005-04-21 Thread Antoon Pardon
Op 2005-04-21, Raymond Hettinger schreef [EMAIL PROTECTED]: [Antoon Pardon] I don't see why the start index can't be accessible through a method or function just like the length of a list is now. My favourite would be a range method so we would have the following idiom: for i in

Re: Why Python does *SLICING* the way it does??

2005-04-21 Thread Steve Holden
[EMAIL PROTECTED] wrote: Terry Hancock wrote: snip So I like Python's slicing because it bites *less* than intervals in C or Fortran. I disagree. Programming languages should not needlessly surprise people, and a newbie to Python probably expects that x[1:3] = [x[1],x[2],x[3]] . Array-oriented

Re: Why Python does *SLICING* the way it does??

2005-04-21 Thread Reinhold Birkenfeld
Antoon Pardon wrote: I sometimes think python should have been more explicite here, using a marker for the start-index and end-index, may '^' and '$'. So if you wanted the last element you had to write: lst[$] And for the next to last element: lst[$ - 1] This would make

Re: Why Python does *SLICING* the way it does??

2005-04-21 Thread Antoon Pardon
Op 2005-04-21, Reinhold Birkenfeld schreef [EMAIL PROTECTED]: Antoon Pardon wrote: I sometimes think python should have been more explicite here, using a marker for the start-index and end-index, may '^' and '$'. So if you wanted the last element you had to write: lst[$] And for the

Re: Why Python does *SLICING* the way it does??

2005-04-21 Thread Antoon Pardon
Op 2005-04-21, Steve Holden schreef [EMAIL PROTECTED]: [EMAIL PROTECTED] wrote: Terry Hancock wrote: snip So I like Python's slicing because it bites *less* than intervals in C or Fortran. I disagree. Programming languages should not needlessly surprise people, and a newbie to Python

Re: Why Python does *SLICING* the way it does??

2005-04-21 Thread Reinhold Birkenfeld
Antoon Pardon wrote: Op 2005-04-21, Reinhold Birkenfeld schreef [EMAIL PROTECTED]: Antoon Pardon wrote: I sometimes think python should have been more explicite here, using a marker for the start-index and end-index, may '^' and '$'. So if you wanted the last element you had to write:

Re: Why Python does *SLICING* the way it does??

2005-04-21 Thread Antoon Pardon
Op 2005-04-21, Reinhold Birkenfeld schreef [EMAIL PROTECTED]: Antoon Pardon wrote: Op 2005-04-21, Reinhold Birkenfeld schreef [EMAIL PROTECTED]: Antoon Pardon wrote: I sometimes think python should have been more explicite here, using a marker for the start-index and end-index, may '^' and

Re: Why Python does *SLICING* the way it does??

2005-04-21 Thread Rocco Moretti
Steve Holden wrote: The principle of least surprise is all very well, but needless surprise of newbies is a dangerous criterion to adopt for programming language design and following it consistently would lead to a mess like Visual Basic, which grew by accretion until Microsoft realized it was

Re: Why Python does *SLICING* the way it does??

2005-04-21 Thread Dan Bishop
Antoon Pardon wrote: Op 2005-04-21, Steve Holden schreef [EMAIL PROTECTED]: [EMAIL PROTECTED] wrote: ... Along the same lines, I think the REQUIREMENT that x[0] rather than x[1] be the first element of list x is a mistake. At least the programmer should have a choice, as in Fortran or

Re: Why Python does *SLICING* the way it does??

2005-04-21 Thread Paul Rubin
Dan Bishop [EMAIL PROTECTED] writes: Name a problem space that inherently requires arrays to be 1-based rather than 0-based. inherently is too strong a word, since after all, we could do all our computing with Turing machines. Some algorithms are specified in terms of 1-based arrays. And most

Re: Why Python does *SLICING* the way it does??

2005-04-21 Thread Robert Kern
Paul Rubin wrote: Dan Bishop [EMAIL PROTECTED] writes: Name a problem space that inherently requires arrays to be 1-based rather than 0-based. inherently is too strong a word, since after all, we could do all our computing with Turing machines. Some algorithms are specified in terms of 1-based

Re: Why Python does *SLICING* the way it does??

2005-04-21 Thread Ron
Ron wrote: [EMAIL PROTECTED] wrote: Many people I know ask why Python does slicing the way it does. Can anyone /please/ give me a good defense/justification??? I'm referring to why mystring[:4] gives me elements 0, 1, 2 and 3 but *NOT* mystring[4] (5th element). There are actually 4 different

Re: Why Python does *SLICING* the way it does??

2005-04-21 Thread Greg Ewing
Antoon Pardon wrote: This is nonsens. table[i] = j, just associates value j with key i. That is the same independend from whether the keys can start from 0 or some other value. Also, everyone, please keep in mind that you always have the option of using a *dictionary*, in which case your indices

Re: Why Python does *SLICING* the way it does??

2005-04-21 Thread Greg Ewing
Roy Smith wrote: What would actually be cool is if Python were to support the normal math notation for open or closed intervals. foo = bar (1, 2) foo = bar (1, 2] foo = bar [1, 2) foo = bar [1, 2] That would certainly solve this particular problem, but the cost to the rest of the language

Re: Why Python does *SLICING* the way it does??

2005-04-21 Thread Greg Ewing
[EMAIL PROTECTED] wrote: I disagree. Programming languages should not needlessly surprise people, and a newbie to Python probably expects that x[1:3] = [x[1],x[2],x[3]]. But said newbie's expectations will differ considerably depending on which other language he's coming from. So he's almost

Re: Why Python does *SLICING* the way it does??

2005-04-21 Thread beliavsky
Dan Bishop wrote: Antoon Pardon wrote: snip Like users have a choice in how long they make a list, they should have a choice where the indexes start. (And that shouldn't be limited to 0 and 1). Suppose you could. Then what should ([3, 1, 4] indexbase 0) + ([1, 5, 9] indexbase 4)

Re: Why Python does *SLICING* the way it does??

2005-04-21 Thread Paul Rubin
[EMAIL PROTECTED] writes: Suppose you could. Then what should ([3, 1, 4] indexbase 0) + ([1, 5, 9] indexbase 4) equal? If + means add, the result would be ([4,6,13] indexbase 0) . That's counterintuitive. I'd expect c = a + b to result in c[i] = a[i]+b[i] for all elements. So, for

Re: Why Python does *SLICING* the way it does??

2005-04-21 Thread Roy Smith
Greg Ewing [EMAIL PROTECTED] wrote: Also, everyone, please keep in mind that you always have the option of using a *dictionary*, in which case your indices can start wherever you want. You can't slice them, true, but you can't have everything. :-) Of course you can slice them, you just have

Re: Why Python does *SLICING* the way it does??

2005-04-21 Thread Mike Meyer
Roy Smith [EMAIL PROTECTED] writes: Greg Ewing [EMAIL PROTECTED] wrote: Also, everyone, please keep in mind that you always have the option of using a *dictionary*, in which case your indices can start wherever you want. You can't slice them, true, but you can't have everything. :-) Of

Why Python does *SLICING* the way it does??

2005-04-20 Thread [EMAIL PROTECTED]
Many people I know ask why Python does slicing the way it does. Can anyone /please/ give me a good defense/justification??? I'm referring to why mystring[:4] gives me elements 0, 1, 2 and 3 but *NOT* mystring[4] (5th element). Many people don't like idea that 5th element is not invited

Re: Why Python does *SLICING* the way it does??

2005-04-20 Thread Raymond Hettinger
[EMAIL PROTECTED] Many people I know ask why Python does slicing the way it does. Half open intervals are just one way of doing things. Each approach has its own merits and issues. Python's way has some useful properties: * s == s[:i] + s[i:] * len(s[i:j]) == j-i # if s is long

Re: Why Python does *SLICING* the way it does??

2005-04-20 Thread John Bokma
Raymond Hettinger wrote: to seeing code like: for(i=0 ; in; i++) a[i]=f(i); In contrast, a BASIC programmer may be used to FOR I = 1 to N: a[I]=f(I); NEXT. Afaik, at least BBC BASIC uses zero based arrays :-) Maybe ZX Spectrum Basic too (too long ago to remember). -- John

Re: Why Python does *SLICING* the way it does??

2005-04-20 Thread Nick Efford
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Many people I know ask why Python does slicing the way it does. Can anyone /please/ give me a good defense/justification??? I'm referring to why mystring[:4] gives me elements 0, 1, 2 and 3 but *NOT* mystring[4] (5th element). mystring[:4] can

Re: Why Python does *SLICING* the way it does??

2005-04-20 Thread Torsten Bronger
Hallchen! [EMAIL PROTECTED] (Nick Efford) writes: [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Many people I know ask why Python does slicing the way it does. Can anyone /please/ give me a good defense/justification??? I'm referring to why mystring[:4] gives me elements 0, 1, 2 and 3

Re: Why Python does *SLICING* the way it does??

2005-04-20 Thread Terry Hancock
On Wednesday 20 April 2005 01:36 am, Raymond Hettinger wrote: [EMAIL PROTECTED] Many people I know ask why Python does slicing the way it does. [...] Python's way has some useful properties: [...] OTOH, it has some aspects that bite: [...] I suspect that whether it feels natural

Re: Why Python does *SLICING* the way it does??

2005-04-20 Thread Antoon Pardon
Op 2005-04-20, Torsten Bronger schreef [EMAIL PROTECTED]: Hallöchen! [EMAIL PROTECTED] (Nick Efford) writes: [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Many people I know ask why Python does slicing the way it does. Can anyone /please/ give me a good defense/justification??? I'm

Re: Why Python does *SLICING* the way it does??

2005-04-20 Thread Sion Arrowsmith
Raymond Hettinger [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] Many people I know ask why Python does slicing the way it does. Python's way has some useful properties: * s == s[:i] + s[i:] * len(s[i:j]) == j-i # if s is long enough The latter being particularly helpful when i = 0

Re: Why Python does *SLICING* the way it does??

2005-04-20 Thread Bill Mill
On 20 Apr 2005 12:52:19 GMT, Antoon Pardon [EMAIL PROTECTED] wrote: Op 2005-04-20, Torsten Bronger schreef [EMAIL PROTECTED]: Hallöchen! [EMAIL PROTECTED] (Nick Efford) writes: [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Many people I know ask why Python does slicing the way it does

Re: Why Python does *SLICING* the way it does??

2005-04-20 Thread Torsten Bronger
Hallchen! Antoon Pardon [EMAIL PROTECTED] writes: Op 2005-04-20, Torsten Bronger schreef [EMAIL PROTECTED]: [...] It's interesting to muse about a language that starts at 1 for all arrays and strings, as some more or less obsolete languages do. I think this is more intuitive, since most

Re: Why Python does *SLICING* the way it does??

2005-04-20 Thread beliavsky
Terry Hancock wrote: snip So I like Python's slicing because it bites *less* than intervals in C or Fortran. I disagree. Programming languages should not needlessly surprise people, and a newbie to Python probably expects that x[1:3] = [x[1],x[2],x[3]] . Array-oriented languages, such as

Re: Why Python does *SLICING* the way it does??

2005-04-20 Thread Roy Smith
Antoon Pardon [EMAIL PROTECTED] wrote: Personnaly I would like to have the choice. Sometimes I prefer to start at 0, sometimes at 1 and other times at -13 or +7. Argggh. Having two (or more!) ways to do it, would mean that every time I read somebody else's code, I would have to figure out

Re: Why Python does *SLICING* the way it does??

2005-04-20 Thread Antoon Pardon
I know ask why Python does slicing the way it does. Can anyone /please/ give me a good defense/justification??? I'm referring to why mystring[:4] gives me elements 0, 1, 2 and 3 but *NOT* mystring[4] (5th element). mystring[:4] can be read as the first four characters of mystring

Re: Why Python does *SLICING* the way it does??

2005-04-20 Thread Antoon Pardon
Op 2005-04-20, Roy Smith schreef [EMAIL PROTECTED]: Antoon Pardon [EMAIL PROTECTED] wrote: Personnaly I would like to have the choice. Sometimes I prefer to start at 0, sometimes at 1 and other times at -13 or +7. Argggh. Having two (or more!) ways to do it, would mean that every time I

Re: Why Python does *SLICING* the way it does??

2005-04-20 Thread Bill Mill
Efford) writes: [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Many people I know ask why Python does slicing the way it does. Can anyone /please/ give me a good defense/justification??? I'm referring to why mystring[:4] gives me elements 0, 1, 2 and 3 but *NOT* mystring[4] (5th

Re: Why Python does *SLICING* the way it does??

2005-04-20 Thread Diez B. Roggisch
Personnaly I would like to have the choice. Sometimes I prefer to start at 0, sometimes at 1 and other times at -13 or +7. Subclass from builtin list - and make the necessary adjustmenst yourself in an overloaded __getitem__. -- Regards, Diez B. Roggisch --

Re: Why Python does *SLICING* the way it does??

2005-04-20 Thread Roy Smith
Antoon Pardon [EMAIL PROTECTED] wrote: Op 2005-04-20, Roy Smith schreef [EMAIL PROTECTED]: Antoon Pardon [EMAIL PROTECTED] wrote: Personnaly I would like to have the choice. Sometimes I prefer to start at 0, sometimes at 1 and other times at -13 or +7. Argggh. Having two (or more!) ways to

Re: Why Python does *SLICING* the way it does??

2005-04-20 Thread Terry Hancock
On Wednesday 20 April 2005 07:52 am, Antoon Pardon wrote: Personnaly I would like to have the choice. Sometimes I prefer to start at 0, sometimes at 1 and other times at -13 or +7. Although I would classify that as a rare use case. So, it ought to be possible to do it, but not necessarily

Re: Why Python does *SLICING* the way it does??

2005-04-20 Thread Bernhard Herzog
Torsten Bronger [EMAIL PROTECTED] writes: It's interesting to muse about a language that starts at 1 for all arrays and strings, as some more or less obsolete languages do. I think this is more intuitive, since most people (including mathematicians) start counting at 1. The reason for

Re: Why Python does *SLICING* the way it does??

2005-04-20 Thread Aaron Bingham
Bernhard Herzog [EMAIL PROTECTED] writes: There are very good reasons for half-open intervals and starting at 0 apart from memory organization. Dijkstra explained this quite well in http://www.cs.utexas.edu/users/EWD/ewd08xx/EWD831.PDF Thanks for the excellent link! --

Re: Why Python does *SLICING* the way it does??

2005-04-20 Thread Torsten Bronger
Hallchen! Bernhard Herzog [EMAIL PROTECTED] writes: Torsten Bronger [EMAIL PROTECTED] writes: It's interesting to muse about a language that starts at 1 for all arrays and strings, as some more or less obsolete languages do. I think this is more intuitive, since most people (including

Re: Why Python does *SLICING* the way it does??

2005-04-20 Thread Peter Hansen
Terry Hancock wrote: However, I used to make off by one errors all the time in both C and Fortran, whereas I hardly ever make them in Python. This should probably be the overriding concern in this case. I can't remember the last time I made an off-by-one error in Python (or, really, whether I ever

Re: Why Python does *SLICING* the way it does??

2005-04-20 Thread Bernhard Herzog
Torsten Bronger [EMAIL PROTECTED] writes: http://www.cs.utexas.edu/users/EWD/ewd08xx/EWD831.PDF I see only one argument there: Inclusion of the upper bound would then force the latter to be unnatural by the time the sequence has shrunk to the empty one. While this surely is unaesthetical, I

Re: Why Python does *SLICING* the way it does??

2005-04-20 Thread Torsten Bronger
Hallchen! Bernhard Herzog [EMAIL PROTECTED] writes: Torsten Bronger [EMAIL PROTECTED] writes: http://www.cs.utexas.edu/users/EWD/ewd08xx/EWD831.PDF I see only one argument there: Inclusion of the upper bound would then force the latter to be unnatural by the time the sequence has shrunk

Re: Why Python does *SLICING* the way it does??

2005-04-20 Thread Roy Smith
Terry Hancock wrote: I used to make off by one errors all the time in both C and Fortran, whereas I hardly ever make them in Python. Part of the reason may be that most loops over lists involve iterators, where the details of the index limits are hidden. In Python, you write: for item in

Re: Why Python does *SLICING* the way it does??

2005-04-20 Thread James Stroud
On Tuesday 19 April 2005 10:58 pm, [EMAIL PROTECTED] wrote: Many people I know ask why Python does slicing the way it does. Can anyone /please/ give me a good defense/justification??? Here you go, no remembering +1 or -1. Also, see the hundreds of other times this topic has graced

Re: Why Python does *SLICING* the way it does??

2005-04-20 Thread James Carroll
. always. -Jim On 19 Apr 2005 22:58:49 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Many people I know ask why Python does slicing the way it does. Can anyone /please/ give me a good defense/justification??? I'm referring to why mystring[:4] gives me elements 0, 1, 2 and 3

Re: Why Python does *SLICING* the way it does??

2005-04-20 Thread James Stroud
I like this, it works for any integer. str=asdfjkl; i=-400 print str[:i]+str[i:] asdfjkl; i = 65534214 print str[:i]+str[i:] asdfjkl; Please forgive my reassigning str. I am one of those type first think later programmers. -- James Stroud UCLA-DOE Institute for Genomics and Proteomics

Re: Why Python does *SLICING* the way it does??

2005-04-20 Thread Javier Bezos
[EMAIL PROTECTED] escribió en el mensaje news:[EMAIL PROTECTED] Many people I know ask why Python does slicing the way it does. Can anyone /please/ give me a good defense/justification??? I'm referring to why mystring[:4] gives me elements 0, 1, 2 and 3 but *NOT* mystring[4] (5th

Re: Why Python does *SLICING* the way it does??

2005-04-20 Thread Javier Bezos
James Stroud [EMAIL PROTECTED] escribió en el mensaje news:[EMAIL PROTECTED] I like this, it works for any integer. str=asdfjkl; i=-400 print str[:i]+str[i:] asdfjkl; i = 65534214 print str[:i]+str[i:] asdfjkl; Actually, this has no relation with the half-open slices but with the

Re: Why Python does *SLICING* the way it does??

2005-04-20 Thread Terry Hancock
On Wednesday 20 April 2005 12:28 pm, Roy Smith wrote: Terry Hancock wrote: I used to make off by one errors all the time in both C and Fortran, whereas I hardly ever make them in Python. Part of the reason may be that most loops over lists involve iterators, both endpoints are

Re: Why Python does *SLICING* the way it does??

2005-04-20 Thread Peter Hansen
James Carroll wrote: If you have five elements, numbered 0,1,2,3,4 and you ask for the elements starting with the first one, and so on for the length you would have [0:length]. So [0:5] gives you elemets 0,1,2,3,4. Think of the weirdess if you had to ask for [0:length-1] to get length

Re: Why Python does *SLICING* the way it does??

2005-04-20 Thread Mike Meyer
Antoon Pardon [EMAIL PROTECTED] writes: Op 2005-04-20, Torsten Bronger schreef [EMAIL PROTECTED]: Hallöchen! [EMAIL PROTECTED] (Nick Efford) writes: [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Many people I know ask why Python does slicing the way it does. Can anyone /please/ give me