-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
[libc] Use idiomatic main() function in newhdrgen/yaml_to_classes.py #113419
Conversation
This changes the entry-point Python script of newhdrgen to use the idiomatic main() function of no arguments that does the whole job of the script. This replaces the unusual pattern of having an idiosyncratic main(...) signature and having the script's direct code do argument parsing outside the main function. The idiomatic pattern makes it possible to usefully wrap the script in Python and still use its full command-line functionality.
@llvm/pr-subscribers-libc Author: Roland McGrath (frobtech) ChangesThis changes the entry-point Python script of newhdrgen to use Full diff: https://github.com/llvm/llvm-project/pull/113419.diff 1 Files Affected:
|
…lvm#113419) This changes the entry-point Python script of newhdrgen to use the idiomatic main() function of no arguments that does the whole job of the script. This replaces the unusual pattern of having an idiosyncratic main(...) signature and having the script's direct code do argument parsing outside the main function. The idiomatic pattern makes it possible to usefully wrap the script in Python and still use its full command-line functionality.
This changes the entry-point Python script of newhdrgen to use
the idiomatic main() function of no arguments that does the whole
job of the script. This replaces the unusual pattern of having
an idiosyncratic main(...) signature and having the script's
direct code do argument parsing outside the main function. The
idiomatic pattern makes it possible to usefully wrap the script
in Python and still use its full command-line functionality.