On 13Jun2024 19:44, dieter.mau...@online.de <dieter.mau...@online.de> wrote:
Why not use:
```
try:
with open()...
...
except FileNotFoundError:
...
```
This is exactly what the OP was expressing dissatisfaction with.
I'm -1 on the idea myself - not every combination of things needs
additional syntactic support, and doing stuff like merging an `except`
with a `wtih` is bound to introduce some weird corner case, complicating
its semantics.
Cheers,
Cameron Simpson <c...@cskk.id.au>
--
https://mail.python.org/mailman/listinfo/python-list