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 — gh-108494: Argument Clinic: fix option group for Limited C API by vstinner · Pull Request #108574 · python/cpython Conversation
|
|
Issue found while converting syslog to the limited C API. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| nargs = 'PyTuple_Size(args)' | ||
| else: | ||
| nargs = 'PyTuple_GET_SIZE(args)' | ||
| add(f"switch ({nargs}) {{\n") |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Style suggestion -- because of the f-strings needing the duplication of {, perhaps just being explicit in both cases would be worth it?
| nargs = 'PyTuple_Size(args)' | |
| else: | |
| nargs = 'PyTuple_GET_SIZE(args)' | |
| add(f"switch ({nargs}) {{\n") | |
| add("switch (PyTuple_Size(args)) {\n") | |
| else: | |
| add("switch (PyTuple_GET_SIZE(args)) {\n") |
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.
LGTM, other than @AA-Turner's style nit, which I agree with :)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Merged, thanks for reviews. I prefer to avoid repetition even if the f-string is just a little bit surprising. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
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.