This is a valid concern, thank you for pointing out.
Among the links you provided there are following ideas:
- Should loops be in their own scope? [poll]
It is different from what I posted here. It is specific to loops. It also has its own topics of discussion, e.g. making it backwards compatible. - Lack of block scope
This one discusses different syntax. It proposes making blocks inside constructions likeif/else
,while/for
scoped. That specific discussion was destined to end up fruitless, because the syntax was confusing and not backwards compatible. - Ad-hoc scoping to organize code (see also PEP 359)
This one is different from what I posted. Namespaces is separate from block scoping and a large topic on its own. The rationale is also different.