
July 17, 2020
10:45 a.m.
On Fri, Jul 17, 2020 at 11:14:21AM +0100, Jonathan Fine wrote:
So what should be the new behaviour of: >>> d = dict() >>> d[x=1, y=2] = 3
TypeError: dict subscripting takes no keyword arguments Just because something is syntactically allowed doesn't mean it has to be given a meaning in all circumstances. Just as not all functions accept keyword arguments: py> len(x=1) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: len() takes no keyword arguments so not all subscriptable objects will accept keywords. -- Steven