Brandt Bucher

Results 233 comments of Brandt Bucher

I think the exception for named tuples and dataclasses is okay though. They'd surely get `__match_args__` anyways, and it's a great POC.

Depending on timing, that stdlib review could make a great PyCon sprint.

A slight variant that saves a line and a level of indentation. ``` match case [if ]: case [if ]: # repeated cases ``` +0, personally. It's not ugly to...

I've been thinking about this more, and I wonder if looking up `__match_args__` and `__match_args_required__` on the called class makes more sense. Consider `typing.NamedTuple`. Currently, it doesn't support auto-generating `__match_args__`,...

Yeah. In general Liskov voilations like this (`dict`/`defaultdict` is another fairly painful example) break the assumptions that the `__match__` protocol is built on. I think that's okay, though. With that...

Yeah, probably can't get to it today though. If anybody has the time, feel free to steal this!

Looks like we crossed posts. I'm not really a fan of all of the indirection and complexity in that new return type. Since it doesn't gain us anything, I'd say...

I'm in favor of relaxing this. Note that `__slots__` special cases a single string. Should we be consistent with that behavior?