09.04.20 03:46, Henk-Jaap Wagenaar пише:
I like the idea of formalizing "unused variables".
How about having a syntax for it? Allowing a "." instead of an
identifier to signify this behaviour [reusing Serhiy's examples]:
head, ., rest = path.partition('/')
first, second, *. = line.split()
for . in range(10): ...
[k for k, . in pairs]
Potentially for unpacking one could use nothing, e.g.
first, second, * = line.split()
Changing the syntax has much more high bar that implementing a
transparent optimization. We should have very good evidences that this
will help significant part of programs.
_______________________________________________
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/LFWX3APYNNIGY32EAENEYKVPOPYLDAK5/
Code of Conduct: http://python.org/psf/codeofconduct/