bout is:
match (named_tuple_object.*missing_attribute*, a_random_string):
case *AttributeError*, "Catching an attribute error":
print("Catches as attribute error")
case *err:= AttributeError*, "Assigns an attribute error as err":
print(f"This is the capt
kind of syntax?
Maybe the author could explicitly distinguish that an exception might be
raised by using *with Exception *like so:
match *this_raises_an_exception*, *this_raises_another_exception** with
Exception:*
On Mon, Jan 3, 2022 at 7:25 PM Steven D'Aprano wrote:
> Hi Elvis,
>
&g
Thanks for the feedback everyone. I've only encountered the use case once,
like you've mentioned it's probably not worth the effort given that it's
such a small problem space.
Thanks again!
On Tue, Jan 4, 2022, 00:18 Steven D'Aprano wrote:
> On Mon, Jan 03, 202