-
Notifications
You must be signed in to change notification settings - Fork 65
Please document the design decisions behind PEP 634. #173
Comments
One particular thing I would like to know is whether you considered using class C:
__match_args__ = ("a", "b")
match x:
case C(x=x):
... would raise an exception rather than just failing to match. |
The
Hence, no, this would not raise an exception but probably just fail to match—given the rather weird code with |
And on the question about whether we considered tying Take for example
It would not make sense to have
Now, I understand that it would be nice if we could constrain the legal attributes, but that should not be rolled into |
I feel like this is already getting a bit off-topic. 🙂
The way I see it, that's what the issue tracker in this repo is for. It's publicly available, searchable, and pretty well-labeled. A lot of the issues also contain links back to relevant mailing list discussions, etc. Not everything is here (or easily-discoverable), but new issues can be opened for anything that's missing. I'm not sure there's really a better format for documenting for posterity the thought process behind every decision that was made in a huge year-long project like this (above and beyond what PEP 635 already provides)... especially one that is still on-going, to some degree. |
I understand that you can't cover every decision, but an overview which documents some of the key decisions would be very valuable, IMO. That's why I asked explicitly about the |
We thought we did a decent job with PEP 634 and 635 together. Your question about |
Well, that's what PEP 635 is supposed to be. I'm open to adding "missing" sections to PEP 635 if they are deemed important enough. But I'd rather not get carried away, since we'd probably just be summarizing conversations found in this repo or on mailing lists. |
The acceptance notice for PEP 634 says:
Presumably that mainly includes tutorial and specifications, but I think it would be valuable for maintainers (e.g. me) and users to better understand why things are the way they are.
It might also prevent me, and others, having to rehash discussions you've already had, as we could know the thinking behind various decisions.
The text was updated successfully, but these errors were encountered: