
Oct. 4, 2021
7:25 a.m.
On Sun, 3 Oct 2021 19:42:29 +0200 Łukasz Langa <lukasz@langa.pl> wrote:
-1
If I could read the vertical line as a pipe character, the expression would read "except or E as e". But I can't read it that way anyway. Instead, all I see is a lowercase EXCEPTL.
My idea is this:
try: ... except group E as e: ... except group E1, T2 as e: ...
Should be doable given the magical match-case contextual keywords precedent. This looks nice and is explicit, since you will always get an ExceptionGroup instance under `e`.
+1. This is much more helpful to the reader than the cryptic asterisk. Regards Antoine.