On 14/08/20 10:03 pm, Jonathan Fine wrote:
NO POSITIONAL ARGUMENTS I'd like >>> d[x=1, y=2] to be valid syntax. It's not clear to me that all agree with this.
If keywords are to be allowed, it seems reasonable to me that this should be legal.
>>> d[x=1, y=2] = 42 >>> d[x=1, y=2] 42 >>> d[a='alpha', g='gamma', z=12] = 'cheese' >>> d[a='alpha', g='gamma', z=12] 'cheese' My question is this: Should such a class ... be part of standard Python,
Do you have any use cases in mind for this? To justify being built in, it would need to have a wide range of uses. -- Greg _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/6VVW3OB2AWOMPGF7YSILKX6V3BKCO5ZJ/ Code of Conduct: http://python.org/psf/codeofconduct/