Terry J. Reedy <tjre...@udel.edu> added the comment:
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> ---------- nosy: +terry.reedy _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41272> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com