Seek support for new slice syntax PEP.

Lie Ryan lie.1296 at gmail.com
Mon Dec 14 14:41:15 EST 2009


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).



More information about the Python-list mailing list