Steven D'Aprano wrote:
for i in range(0, 100):
const foo = f(i)
const bar = g(i, foo)
do_something_with(bar)
You are binding some value f(0) to the
constant name "foo" on the first loop, then on the second loop you try
to rebind a new value to the same name "foo".
It could be made to kind of work if you were allowed to
re-execute the same let statement, but not assign to the
name with another statement in the same function.
--
Greg
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/