On Sun, 29 Nov 2020 at 23:34, Guido van Rossum <[email protected]> wrote: > OTOH if we were to introduce 'let' or 'const' in the language, it would > surely be usable to solve a whole bunch of other problems, in addition to > giving us a cleaner way to solve the value capture problem.
Well, IMHO let could help the famous misspelled var problem: myvar = 5 [...] myvvar = 7 # Whops! but to work, if let is used somewhere in the scope, all the variables declared in the scope must be declared with let: let myvar = 5 myvvar = 7 # SyntaxError But I'm really unsure that this is what you want. _______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/WZ3LWBIXYKT33IFSFPVQVTERANOK74AH/ Code of Conduct: http://python.org/psf/codeofconduct/
