On Mon, Aug 24, 2020, at 00:43, Christopher Barker wrote:
> But thus brings up a broader question:
>
> Why not allow slice syntax as an expression everywhere? Everywhere I’ve
> tried, it’s a syntax error now, but is there any technical reason that
> it couldn’t be used pretty much anywhere?
is {a:b} a set containing a slice, or a dict? obviously it's a dict, but are
there any other places that might be affected? what about other forms of
slices, or if it's not the only element? should we support {a, b:c} as a set
containing a slice? what about {a:b, c}?
there may be other places it might be desirable to add new syntax that uses the
colon character, allowing slices anywhere would foreclose that.
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/CEF2MFP6WA4RKRV4TNWCDTNLAPZ243VD/
Code of Conduct: http://python.org/psf/codeofconduct/