GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||
GeezerVison is showing github.com — bpo-37540: vectorcall: keyword names must be strings by jdemeyer · Pull Request #14682 · python/cpython Conversation
|
|
Instead of "string", I'd say "`str` or a subclass" explicitly. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
There are many instances in the documentation (unrelated to vectorcall) where the word "string" is used. I don't see the problem here. Concrete proposal: we leave this doc as is and I will reboot #13844 (I always planned to do that, but after all other PRs that affect documentation). In the section describing the "vectorcall protocol", I will say explicitly what "string" means for vectorcall. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Is this PR okay now or do you want me to change things? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@markshannon, you said you were looking at this PR. Is that still the case? Any progress? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Ping? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
@markshannon seems unresponsive. I don't see an issue with this PR.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| >>> f(**{1: 3}, **{1: 5}) | ||
| Traceback (most recent call last): | ||
| ... | ||
| TypeError: f() keywords must be strings |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I see f(**{1:2}) is still tested in test_excall.py.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Indeed. This is testing two errors at the same time (duplicate keyword and non-string keyword). Which of the two errors you get seems arbitrary to me and this PR changes the error.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks! This will help to make progress on some other PRs. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The fact that keyword names are strings is now part of the vectorcall and `METH_FASTCALL` protocols. The biggest concrete change is that `_PyStack_UnpackDict` now checks that and raises `TypeError` if not. CC @markshannon @vstinner https://bugs.python.org/issue37540
The fact that keyword names are strings is now part of the vectorcall and `METH_FASTCALL` protocols. The biggest concrete change is that `_PyStack_UnpackDict` now checks that and raises `TypeError` if not. CC @markshannon @vstinner https://bugs.python.org/issue37540
The fact that keyword names are strings is now part of the vectorcall and `METH_FASTCALL` protocols. The biggest concrete change is that `_PyStack_UnpackDict` now checks that and raises `TypeError` if not. CC @markshannon @vstinner https://bugs.python.org/issue37540
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.