On Thu, 20 Jul 2023 at 19:34, Dom Grigonis <[email protected]> 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
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/77JRIT2DXV3NGPLAJPHZAPFBTTVEZSB2/
Code of Conduct: http://python.org/psf/codeofconduct/