Re: range syntax

2006-11-12 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Colin J. Williams <[EMAIL PROTECTED]> wrote: . . . >Your point about iterators is well taken, but it seems that the range is >used sufficiently frequently that some syntactic form would be helpf

Re: range syntax

2006-11-11 Thread Colin J. Williams
Fredrik Lundh wrote: > Colin J. Williams wrote: > >> One of the little irritants of Python is that the range syntax is rather >> long-winded: >> [Dbg]>>> range(3, 20, 6) >> [3, 9, 15] >> [Dbg]>>> >> It would be nice if one could have something like 3:20:6. > > if you find yourself using range a

Re: range syntax

2006-11-10 Thread Antoon Pardon
On 2006-11-10, Roberto Bonvallet <[EMAIL PROTECTED]> wrote: > Colin J. Williams wrote: >> One of the little irritants of Python is that the range syntax is rather >> long-winded: >> [Dbg]>>> range(3, 20, 6) >> [3, 9, 15] >> [Dbg]>>> >> It would be nice if one could have something like 3:20:6. > >

Re: range syntax

2006-11-10 Thread Fredrik Lundh
Colin J. Williams wrote: > One of the little irritants of Python is that the range syntax is rather > long-winded: > [Dbg]>>> range(3, 20, 6) > [3, 9, 15] > [Dbg]>>> > It would be nice if one could have something like 3:20:6. if you find yourself using range a lot, maybe you should check if you

Re: range syntax

2006-11-10 Thread Roberto Bonvallet
Colin J. Williams wrote: > One of the little irritants of Python is that the range syntax is rather > long-winded: > [Dbg]>>> range(3, 20, 6) > [3, 9, 15] > [Dbg]>>> > It would be nice if one could have something like 3:20:6. In that case, how would the parser know which colon terminates the 'for