| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Frozendict has `_Py_TPFLAGS_MATCH_SELF` set so works correctly with the single-arg class matching. However it isn't documented in the list of classes this works with and it isn't tested. The test is some way below the other similar tests but anything else would need a large renumbering
|
I'm assuming this is fine to bundle onto the original frozendict issue, but can change that if needed (...Although I originally linked it to a previous reject proposal by mistake...) |
Sorry, something went wrong.
Documentation build overview118 files changed · + 2 added · ± 116 modified + Added ± Modified |
Sorry, something went wrong.
| self.assertEqual(x, 0) | ||
| self.assertEqual(y, 1) | ||
|
|
||
| def test_patma_267(self): |
There was a problem hiding this comment.
I don't know the rationale for using an identifier to name the test method. Can you rename it to test_patma_frozendict()?
Sorry, something went wrong.
|
Oh, I didn't notice that I copied _Py_TPFLAGS_MATCH_SELF flag when I implemented frozendict. Thanks for updating the tests and the doc! |
Sorry, something went wrong.
I guess it isn't too late to remove the flag of you don't want it. But I think the flag makes sense. I've updated the function name to be more descriptive |
Sorry, something went wrong.
|
Thanks, I merged your change. |
Sorry, something went wrong.
|
GH-151701 is a backport of this pull request to the 3.15 branch. |
Sorry, something went wrong.
GH-150799) (#151701) gh-141510 Document and test frozendict class matching behaviour (GH-150799) Frozendict has `_Py_TPFLAGS_MATCH_SELF` set so works correctly with the single-arg class matching. However it isn't documented in the list of classes this works with and it isn't tested. The test is some way below the other similar tests but anything else would need a large renumbering. (cherry picked from commit fd53ae1) Co-authored-by: da-woods <dw-git@d-woods.co.uk>
…python#150799) Frozendict has `_Py_TPFLAGS_MATCH_SELF` set so works correctly with the single-arg class matching. However it isn't documented in the list of classes this works with and it isn't tested. The test is some way below the other similar tests but anything else would need a large renumbering.
| Back | FazBrowse Home | New Git URL |
Frozendict has _Py_TPFLAGS_MATCH_SELF set so works correctly with the single-arg class matching. However it isn't documented in the list of classes this works with and it isn't tested.
The test is some way below the other similar tests but anything else would need a large renumbering