On Tue, Dec 1, 2020 at 5:43 PM Paul Sokolovsky <pmiscml@gmail.com> wrote:
That's in the eye of the beholder, I'm afraid. So, if you don't want to
be convinced of those clarity improvements, you'll never be.

It's hard to be convinced by something that neither you nor anyone else on the thread has actually presented.

Other than posturing about "dire need" and vague hand-waving about potential speed-ups, there's absolutely nothing that makes this desirable.  Not even a small toy example, let alone a more real world need.  Yes, some other languages have block level scopes.  And some other languages have constants.  But you have not even *suggested* why this would be good for Python itself (I guess other than "gotta keep up with the Javascript programmers").

It's not especially common, but I've sometimes written:

for i in big_collection:
    if condition():
    # other stuff
... intervening code ...
if i+1 < len(big_collection):
On the other hand, I can count on one hand, without using any fingers, the number of times when I would have used:

for const i in big_collection:
    # whatever

It's just not a need that arises.

There exist TWO highly successful, widely used, JIT compilers for Python.  PyPy and Numba.  Neither one of them would have any use whatsoever for this constantness.  Or if you believe otherwise, get a developer of one of those to comment so.  JIT'd Python simply is not slow, even compared to compiled languages.  Searching for maybe-possibly-someday optimizations while ignoring the actual speed paths, is silly.

The dead increasingly dominate and strangle both the living and the
not-yet born.  Vampiric capital and undead corporate persons abuse
the lives and control the thoughts of homo faber. Ideas, once born,
become abortifacients against new conceptions.