Re: list (range) syntax

2007-10-26 Thread Christof Winter
Ryan Ginstrom wrote: >> On Behalf Of Steven D'Aprano >> Because in common English, counting starts at 1 and ranges >> normally include both end points (that is, it is a "closed" >> interval). If you say "I'll be away from the 4th to the 7th" >> and then turn up on the 7th, nearly everyone will w

Re: list (range) syntax

2007-10-24 Thread Carl Banks
On Oct 24, 6:44 pm, Michal Bozon <[EMAIL PROTECTED]> wrote: > many Python newcomers are confused why > range(10), does not include 10. > > If there was a proposal for the new > syntax for ranges, which is known > e.g. from Pascal or Ruby... > > >>> [0..10] > > [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] > >

RE: list (range) syntax

2007-10-24 Thread Ryan Ginstrom
> On Behalf Of Steven D'Aprano > Because in common English, counting starts at 1 and ranges > normally include both end points (that is, it is a "closed" > interval). If you say "I'll be away from the 4th to the 7th" > and then turn up on the 7th, nearly everyone will wonder why > you're back a

Re: list (range) syntax

2007-10-24 Thread Steven D'Aprano
On Wed, 24 Oct 2007 16:28:20 -0700, [EMAIL PROTECTED] wrote: > On Oct 24, 5:44 pm, Michal Bozon <[EMAIL PROTECTED]> wrote: >> many Python newcomers are confused why range(10), does not include 10. > > How can they be confused? Because in common English, counting starts at 1 and ranges normally

Re: list (range) syntax

2007-10-24 Thread [EMAIL PROTECTED]
On Oct 24, 5:44 pm, Michal Bozon <[EMAIL PROTECTED]> wrote: > many Python newcomers are confused why > range(10), does not include 10. How can they be confused? Does base 10 have a digit ten? Does base 2 have a digit two? Does base 16 have a digit sixteen? Haven't you stopped counting on your f