8000 gh-94430: Allow parameters named `module` or `self` with custom C names in Argument Clinic by erlend-aasland · Pull Request #94431 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-94430: Allow parameters named module or self with custom C names in Argument Clinic #94431

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 7, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
F677
Diff view
Diff view
Prev Previous commit
Next Next commit
Slightly improve key names
  • Loading branch information
Erlend Egeberg Aasland authored Jul 5, 2022
commit f3dbd47ad7ad5e62cd9cb7a5e174ba3d85179055
2 changes: 1 addition & 1 deletion Tools/clinic/clinic.py
Original file line number Diff line number Diff line change
Expand Up @@ -4716,7 +4716,7 @@ def bad_node(self, node):
elif names and parameter_name == names[0] and c_name is None:
fail("Params named 'module' or 'self' need custom C names")

key = f"{parameter_name}_{c_name}" if c_name else parameter_name
key = f"{parameter_name}_as_{c_name}" if c_name else parameter_name
self.function.parameters[key] = p

def parse_converter(self, annotation):
Expand Down
0