Author terry.reedy
Recipients catrudis, eric.smith, terry.reedy
Date 2020-07-18.19:27:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1595100420.93.0.919322968133.issue41272@roundup.psfhosted.org>
In-reply-to
Content
I think this should be closed as 'rejected'.

1. I am strongly opposed to giving keywords strongly context-dependent alternate meanings.  I also don't think that the proposal could be parsed.  Currently, 'if' introduces a new, independent statement, and making it dependent is not backwards compatible.

2. The proposal is unnecessary as the conditions can already be detected, and being explicit is much more flexible than the proposal.

for i001 in iterable: pass  # i001 is a new local name.

try:
    i001
    <loop executed at least once>
except NameError:
    <loop never executed>

for i in range(5):
    if i > 3:
        break001 = True  # New local.
        break

try:
    break001
    < loop broke>
except NameError:
    < loop exited normally>
History
Date User Action Args
2020-07-18 19:27:00terry.reedysetrecipients: + terry.reedy, eric.smith, catrudis
2020-07-18 19:27:00terry.reedysetmessageid: <1595100420.93.0.919322968133.issue41272@roundup.psfhosted.org>
2020-07-18 19:27:00terry.reedylinkissue41272 messages
2020-07-18 19:27:00terry.reedycreate