Message349570
My apologies if I missed something, but do we have a consensus on the desired solution? My understanding of `try/finally` is that whatever happens in the `finally` clause should: - always happen - win any conflicts with `try` clause For example: try: a = 2 finally: a = 3 print(a) # 3 and def f(): try: return 5 finally: return 7 print(f()) # 7 So it seems like the ideal solution to: def mult(thing): print(thing*2) return thing * 2 def simple(): for number in range(2): try: return mult(number) finally: continue print(simple()) would be: 0 2 None | |
| Date | User | Action | Args | | 2019-08-13 15:24:08 | ethan.furman | set | recipients: + ethan.furman, vstinner, eric.smith, lukasz.langa, Mark.Shannon, serhiy.storchaka, ppperry, pablogsal, xtreak, BTaskaya | | 2019-08-13 15:24:08 | ethan.furman | set | messageid: <1565709848.5.0.0810334993013.issue37830@roundup.psfhosted.org> | | 2019-08-13 15:24:08 | ethan.furman | link | issue37830 messages | | 2019-08-13 15:24:08 | ethan.furman | create | | |