On 8/30/2020 7:25 AM, Steven D'Aprano wrote:
On Sun, Aug 30, 2020 at 09:56:28PM +1200, Greg Ewing wrote:
A thought just occurred to me. If we hadn't got rid of tuple
unpacking in argument lists, we would have been able to write
def __getitem__(self, (x, y, z), **kwds):
...
Indeed.
Now that Python is moving to a PEG parser, maybe we could consider tuple
unpacking parameters again?
I was sad to see tuple arg unpacking go. But PEP 3113 doesn't mention
parsability as a reason to remove it. And indeed, since it worked with
the old parser, the PEG parser would presumably have no problem with it.
PEP 3113 mentions introspection, which is why I grudgingly accept that
it had to go. Maybe if someone solved that problem we could get them
back. But that would be a major effort, separate from this proposal, and
would of course require another PEP.
Eric
_______________________________________________
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/LBKATTNJT52FDFTGLYOB2JVFNZ64PLOL/
Code of Conduct: http://python.org/psf/codeofconduct/