We see a notice indicating that this is your first post on this forum, so welcome to the Python community, @pythonic-guru!
You might be interested in looking at the following information, which may enhance your benefit from the discussions here:
Also please take a casual browse through the various categories to get a general view of what is happening here.
With regard to block scope of variables initialized in loops, there was an informal poll here several years ago:
Note that with 128 voters, the results were as follows:
- 80%: No change, leave loops as they are.
- 11%: Change loops to use their own scope.
- 9%: No change for loops by default, but add an option to run them in a new scope.
So, it currently seems a bit of a climb to gain acceptance for that proposal.