Rest assured this is not a problem. In any case it’s the compiler, not the parser, that generates the bytecode, from the AST. The compiler always has the full AST available before it is asked to generate any bytecode. The new parser just allows more flexible syntactic constructs, esp. “soft keywords”.

*If* you want tou propose clearer syntax for this, please extend the loop syntax, not the ‘if’ syntax. So, ‘case ... zero’ makes more sense than ‘if [not] break’.

—Guido

On Tue, Jul 28, 2020 at 03:26 Jonathan Fine <jfine2358@gmail.com> wrote:
Hi Rob

You wrote:

So:  You're asking that the bytecode generated for the for-loop depends
on something that happens (or not) after the end of the for-loop body
(which could be arbitrarily long).
 
I speak from ignorance, but I suspect that even with the new parser,
which I am reliably informed can make the tea and implement world peace,
that would be asking a lot.

I'm also speaking from ignorance. However, here I'm the optimist. Ignorance is bliss. You're the pessimist. The devil is in the details.

Until we have knowledge and wisdom on this, I think we need both points of view. So I'm grateful for your https://en.wikipedia.org/wiki/Grain_of_salt (American English, pinch of salt in British English). I hope it makes my dish taste better!
-- 
Jonathan
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-leave@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/AHONH5PRIXOK7KY5HSP2ATGVFXAOG5JS/
Code of Conduct: http://python.org/psf/codeofconduct/
--
--Guido (mobile)