ursalang / ursa

A friendly, stable general-purpose programming language
https://ursalang.github.io
3 stars 1 forks source link

Finalisation of generators #68

Open apt1002 opened 3 weeks ago

apt1002 commented 3 weeks ago

Want to be able to do the following in Ursa:

def m(n):
    try:
        yield n
    finally:
        print("hello")

for q in m(7):
    print(q)
    break