Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
gh-91049: Introduce set vectorcall field API for PyFunctionObject#92257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes from1 commit
9cf96ec282e3dcedcdcf1debf5a9473d18d76e8c9d33374591543f4408082bded9332724ffd3089cb4b23387d4ab0cc28a99e408524353c860f7769376ee7556ffc705340e87a5e9d1312faf5266234709149f14e732d7e84874fbFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
…_getattribute__
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -770,6 +770,22 @@ def f(num): return num + 1 | ||
| for _ in range(51): | ||
Fidget-Spinner marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| self.assertEqual("overridden", f(num)) | ||
| def test_setvectorcall_load_attr_specialization(self): | ||
| from _testcapi import function_setvectorcall | ||
| class X: | ||
| def __getattribute__(self, attr): | ||
| return attr | ||
| x = X() | ||
| # trigger LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN specialization | ||
| for _ in range(8): | ||
| self.assertEqual("a", x.a) | ||
Fidget-Spinner marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| function_setvectorcall(X.__getattribute__) | ||
| # make sure specialization doesn't override the override | ||
| for _ in range(8): | ||
Fidget-Spinner marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| self.assertEqual("overridden", x.a) | ||
| @requires_limited_api | ||
| def test_vectorcall_limited(self): | ||
| from _testcapi import pyobject_vectorcall | ||