On 12/15/2009 5:03 AM, Dave wrote:
Just as sets may now be written as {3,'hi'}, I propose that slices
should be available using [start:end] syntax. Following example comes
from projecteuler.net problem 166. The Numeric community would also
like this, as would the general python user. The slice notation would
require one ":" between the brackets to differentiate it from a list,
which is similar to the set notation requirement that disambiguates it
from a dictionary.
I would prefer [a: b, ...] syntax to become an ordered dictionary
literal (if it would ever gain traction).
--
http://mail.python.org/mailman/listinfo/python-list