Re: Access to return / exception context in finally block

2025-09-01 Thread Rob Cliffe via Python-list
On 01/09/2025 14:26, marius.spix--- via Python-list wrote: In your example when would isinstance(__exit_context__, ReturnContext) be True and when would it be False? What would __exit_context__.value be? I can't think of a sensible meaning for it. If no exception occurs, is the value returned

Re: Access to return / exception context in finally block

2025-09-01 Thread Rob Cliffe via Python-list
On 01/09/2025 14:26, marius.spix--- via Python-list wrote: In your example when would isinstance(__exit_context__, ReturnContext) be True and when would it be False? What would __exit_context__.value be? I can't think of a sensible meaning for it. If no exception occurs, is the value returned b

Re: Access to return / exception context in finally block

2025-09-01 Thread marius.spix--- via Python-list
>In your example when would isinstance(__exit_context__, ReturnContext) >be True and when would it be False? What would __exit_context__.value >be? I can't think of a sensible meaning for it. If no exception occurs, >is the value returned by f supposed to be 10/x or __exit_context__.value >+ 1

Re: Python documentary

2025-09-01 Thread Schimon Jehudah via Python-list
Good afternoon. It was a nice listening. Thank you for sharing this movie. I think, that it would be beneficial to have this distributed over P2P networks such as BitTorrent, eD2k, Gnutella, IPFS, et cetera. Speaking of which, I suppose that those mentioned organizations funded this production i

Re: Access to return / exception context in finally block

2025-09-01 Thread Left Right via Python-list
Well, this is the classic example of reinventing Lisp. But why do it incrementally and in this ridiculously inconvenient way? For those unaware of the history: https://gigamonkeys.com/book/beyond-exception-handling-conditions-and-restarts this is an informal explanation of the mechanism. Better ye