syntax enhancement
Terry Reedy
tjreedy at udel.edu
Tue Oct 4 21:45:14 EDT 2011
More information about the Python-list mailing list
Tue Oct 4 21:45:14 EDT 2011
- Previous message (by thread): syntax enhancement
- Next message (by thread): syntax enhancement
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 10/4/2011 9:50 AM, Valiev Sergey wrote: > - `[]` - used for list comprehension, > - `()` - used for generators, > - `[start:stop]` / `[start:stop:step]` - used for slices. > The idea is to use `(start:stop)` / `(start:stop:step)` as 'lazy > evaluated' slices (like itertools.islice). > What do you think about it? a(b) is already used for function calls. Making a(b:c) be something unreleated does not seem like a good idea to me. At present, a[b:c] == a[slice(b,c)]. However, a(slice(b,c)) is already a function call and could not equal a(b:c). -- Terry Jan Reedy
- Previous message (by thread): syntax enhancement
- Next message (by thread): syntax enhancement
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list