Slices objects
Nadav Horesh
Nadav at envision.co.il
Thu Aug 2 13:24:28 EDT 2001
Isn't it a consistency loop-hole that slices object shortcut --- n:m:k
is
valid only in indexing expression and not elsewhere?
Of course there could be a problem with statements like:
for i in n:
...,
or dictionary generation.
With some changes like replacing the : sign with ; (yes, it is a
statement terminator, but not much in use as I see it) or @ ...
Anyway with a convenient syntax slices can be more handy, say, with the
implementation of iterator they can replace the lazy evaluator xrange
function.
Nadav.
More information about the Python-list
mailing list