On 2021-05-27 10:39, Shreyan Avigyan wrote:
Well sometimes we don't want to pollute the module namespace. Two functions can have two variables with the same name but with different values that we want to be static. And this functionality already exists in Python but as a *hack*. This idea proposes to add a new dunder member and a keyword that allows us to use global variables but are limited to local scope. But since it's Python anyone can access it using the dunder member.
This was discussed some years ago. IIRC, one of the questions was about how and when such variables would be initialised.