[Python-ideas] Range and slice syntax
Juancarlo Añez
apalala at gmail.com
Sun Nov 11 11:34:16 EST 2018
On Sun, Nov 11, 2018 at 6:00 AM Chris Angelico <rosuav at gmail.com> wrote:
> Be careful of this last one. If you omit the step, it looks like this:
>
> {start:stop}
>
> which is a dictionary display.
>
The parenthesis could always be required for this new syntax.
In [*1*]: {'a':1}
Out[*1*]: {'a': 1}
In [*2*]: {('a':1)}
File "<ipython-input-2-373a3153a222>", line 1
{('a':1)}
^
SyntaxError: invalid syntax
--
Juancarlo *Añez*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20181111/13230050/attachment.html>
More information about the Python-ideas
mailing list