Repository navigation
Conversation
cmaloney
left a comment
There was a problem hiding this comment.
Most code in cpython calls _PyFrameLocalsProxy_New to get this which still builds a tuple to do call protocol. Move it to call framelocalsproxy_new_impl directly which saves a bit of work in more cases.
With these PRs please include how argument errors change (extra keywords in this case now show up as FrameLocalsProxy() takes no keyword arguments). That's a reasonable change, but want to make the decision to change it recorded.
|
Have moved to call framelocalsproxy_new_impl directly in _PyFrameLocalsProxy_New, and included error message change in PR description. |
cmaloney
left a comment
There was a problem hiding this comment.
Thanks for the PRs! This one looks good to me. I'm away from my workstation a bit so will be a bit until this gets merged. Appreciate the work in building these PRs
|
Thank you for the quick review, much appreciated! |
Replace hand-written framelocalsproxy_new with Argument Clinic + Vectorcall. Extra keywords now report
FrameLocalsProxy() takes no keyword argumentsinstead ofFrameLocalsProxy takes no keyword arguments.Didn't keep old signature with
@text_signaturelike in #162422 (comment) becauseinspect.signature(types.FrameLocalsProxyType)remains(frame, /).Benchmark (default options):
Details