
Ok, this is tricky. So pretty much impossible, given that `Break`, if it was to work has to be evaluated in reference scope, while other delayed objects in their definition scope. ---------------------- Back to deferred evaluation. ---------------------- Giving it a rest for a while. Thank you for your patience.
On 20 Jul 2023, at 12:38, Chris Angelico <rosuav@gmail.com> wrote:
On Thu, 20 Jul 2023 at 19:34, Dom Grigonis <dom.grigonis@gmail.com> wrote:
And ideally, adding 2 builtin(or imported from stdlib) functions: `Break` and `Continue`, which if called act as `break` and `continue` statements.
How would they work? Would every function call have to provide the possibility to return to a location that wasn't where you would otherwise go?
if random.randrange(2): func = Break else: def func(): pass
def wut(): for i in range(1, 10): if i % 3: func() print(i)
wut()
Please, tell me how this would behave.
ChrisA