Tobias Kohn

Results 151 comments of Tobias Kohn

The `__match_args__` is actually used for _positional_ arguments, i.e. the pattern `C(x=x)` has nothing to do with `__match_args__`. From PEP 634 (highlights by me): > **Positional** patterns are converted to...

Agreed. I would keep the semantics bound to syntax as close as possible, i.e. not use sometimes `is` and sometimes `==` when comparing to constants. The idea that `case True:`...

@viridia This probably addresses the numerous ideas brought forward for wanting to have something like `case ==x` and `case is x`. However, as much as I like the idea of...

I concur: it is certainly a trade-off that could go either way and I have no strong feelings for or against either variant. Of course, Nick is using some dramatic...

Yes, I am absolutely on board with the idea of deferring it. It seems to be mostly an implementation detail that is important rather for "meta-tools". Frankly, I share your...

I fully agree with both of you on this. And after Brandt's great answer here to the "_Making the two unnecessarily different..._"-part, there is not much I can add. Concerning...

Here is an example where you might want to have "total" semantics. It is certainly not up to win a beauty contest, of course, but might help with the discussion...

May I just briefly reiterate Brandt's earlier point about 'closing the gap'. Even if we did away with all disputed and fancy patterns such as wildcard- and or-patterns, we would...

Thanks and yes, I can do that.

Just to give two examples to illustrate that the rules are not quite as easy as one might expect. - If we have guards as in `case (x, y) if...