[Python-ideas] A sorted version of **kwargs

Bruce Leban bruce at leapyear.org
Thu Jan 20 21:05:41 CET 2011


On Thu, Jan 20, 2011 at 11:47 AM, Tim Delaney
<timothy.c.delaney at gmail.com>wrote:

>
> ['b':1] would then be ambiguous (appears to be a slice of a list). More
> obvious in the case of [1:2] ...
>

We use parenthesis for tuples and avoid the ambiguity by writing (1,).
In the same way, we could require your examples to be written ['b':1,] and
[1:2,]

--- Bruce
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20110120/b7528a8b/attachment.html>


More information about the Python-ideas mailing list