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.