On Tue, May 25, 2021 at 12:18 AM hw <h...@adminart.net> wrote: > There are more alternatives: Python might create a new variable with > the same name and forget about the old one. Or it doesn't forget about > the old one and the old one becomes inaccessible (unless you have a > reference to it, if there is such a thing in python). How do you call that?
It's the latter option: create a new variable, and the old one becomes inaccessible. That's called "shadowing". It's how scoping works in most languages (called "lexical scope"). ChrisA -- https://mail.python.org/mailman/listinfo/python-list