Skip to content

Conversation

@vstinner
Copy link
Member

@vstinnervstinner commented Jan 19, 2024

Add 'clinic' parameter to Argument Clinic parse_arg() and bad_argument() methods. Remove usage of the 'clinic' global variable in these methods.

Add 'clinic' parameter to Argument Clinic parse_arg() and bad_argument() methods. Remove usage of the 'clinic' global variable in these methods.
@vstinner
Copy link
MemberAuthor

Currently, it is possible to get limited_capi from clinic.limited_capi. But I'm not sure how the code is going to be refactored later, so I prefer to keep the two parameters for now: limited_capi and clinic.

@erlend-aasland
Copy link
Contributor

Sorry, I disagree with this approach 🙂 It would be better to teach CConverter.add_include to handle multiple includes per converter, and then in output_templates() fetch all includes from all the converters and add them via clinic.add_include(). If we teach CConverter.add_include that trick, we won't need clinic in bad_argument. Also, that will result in a much smaller diff! What do you think?

@vstinner
Copy link
MemberAuthor

It would be better to teach CConverter.add_include to handle multiple includes per converter, and then in output_templates() fetch all includes from all the converters and add them via clinic.add_include().

Hum, that's strange: I already wrote an add_include() method in CConverter. In fact, bad_argument() can just reuse it.

I wrote PR #114324 which is way shorter.

@vstinner
Copy link
MemberAuthor

I wrote PR #114324 which is way shorter.

Let's focus on this approach instead. I close this PR.

@vstinnervstinner deleted the ac_pass_clinic branch January 19, 2024 17:24
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@vstinner@erlend-aasland