| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
Sorry, something went wrong.
Sorry, something went wrong.
| _testcapi.dict_getitemstringref | ||
| obj: object | ||
| value: object | ||
| attr_name: str(accept={robuffer}, zeroes=True) |
There was a problem hiding this comment.
It looks like str(accept={str, NoneType}, zeroes=True) according to https://docs.python.org/3/howto/clinic.html?highlight=clinic#how-to-use-real-argument-clinic-converters-instead-of-legacy-converters
Sorry, something went wrong.
There was a problem hiding this comment.
Hi @erlend-aasland and @AlexWaygood it doesn't work when we use str(accept={str, NoneType}, zeroes=True) grammar even if documentation support it. Would you like to take a look?
Error in file 'Modules/_testcapi/dict.c' on line 260:
str_converter: illegal combination of arguments (frozenset({<class 'NoneType'>, <class 'str'>}), False, True)
Sorry, something went wrong.
There was a problem hiding this comment.
The docs are inaccurate; the accept parameter should be accept={robuffer, str, NoneType}. See the definition in clinic.py:
cpython/Tools/clinic/clinic.py
Line 3927 in 23a6db9
Sorry, something went wrong.
There was a problem hiding this comment.
Also, it is possible to just use the legacy converter:
| attr_name: str(accept={robuffer}, zeroes=True) | |
| attr_name: 'z#' |
Sorry, something went wrong.
| _testcapi.dict_getitemref | ||
| obj: object | ||
| attr_name: object | ||
| value: object |
There was a problem hiding this comment.
This is not correct; dict_getitemref only takes two positional-only arguments: obj and attr_name.
Sorry, something went wrong.
| /*[clinic input] | ||
| _testcapi.dict_getitemstringref | ||
| obj: object | ||
| value: object |
There was a problem hiding this comment.
Ditto. value is not part of the spec of this method; dict_getitemstringref only takes two positional-only arguments.
Sorry, something went wrong.
| value: object | ||
| key: str(accept={robuffer}, zeroes=True) |
There was a problem hiding this comment.
The order is incorrect. It should be mapping, key, value.
Sorry, something went wrong.
| _testcapi.dict_getitemstringref | ||
| obj: object | ||
| value: object | ||
| attr_name: str(accept={robuffer}, zeroes=True) |
There was a problem hiding this comment.
The docs are inaccurate; the accept parameter should be accept={robuffer, str, NoneType}. See the definition in clinic.py:
cpython/Tools/clinic/clinic.py
Line 3927 in 23a6db9
Sorry, something went wrong.
| _testcapi.dict_getitemstringref | ||
| obj: object | ||
| value: object | ||
| attr_name: str(accept={robuffer}, zeroes=True) |
There was a problem hiding this comment.
Also, it is possible to just use the legacy converter:
| attr_name: str(accept={robuffer}, zeroes=True) | |
| attr_name: 'z#' |
Sorry, something went wrong.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request. |
Sorry, something went wrong.
|
It significantly reduces readability to me. It significantly increases the number of lines in Modules/_testcapi/dict.c: Modules/_testcapi/dict.c | 412 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------- 1 file changed, 291 insertions(+), 121 deletions(-) And this is not counting the large amount of code added to another file. I have a limited field of vision and can't see anything beyond a limited number of lines of code. Before that, test functions were compact. After these changes, they will exceed my limit. And if I need to understand what exactly the function does, I have to look for the corresponding code in the generated file and then go back to the previous file, but when I look from the file I lose the context and I have to reread each line on the screen again to find the right place. These changes are not friendly to the visually impaired. |
Sorry, something went wrong.
|
@erlend-aasland @corona10 I have made the requested changes; Please Take Another Look! |
Sorry, something went wrong.
|
I think Serhiy's opinion should be taken into account. Converting _testcapi to Argument Clinic is not of importance. |
Sorry, something went wrong.
|
Closing and re-opening to retrigger CLA checks. Sorry for the noise. |
Sorry, something went wrong.
|
The following commit authors need to sign the Contributor License Agreement: |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.