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. > > In that case, how would the parser know which colon terminates the > 'for' in the following example: > > for i in 2:3:4: > ...
By the programmer using parenthesis. Like for i in (2:3): ... Just as you are supposed to use parthesis if you want a tuple as a function argument although normally a comma is enough to form a tuple. -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list