-
Notifications
You must be signed in to change notification settings - Fork 167
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
Refactor patchedast #594
Refactor patchedast #594
Conversation
Hi @Alex-CodeLab, thank you for taking the time to create this PR. However, I don't think many of these refactoring are desirable.
If you revise the PR with these in mind, then we can go ahead with merging this PR. |
|
The result is the same, but the readability isn't. There is a visual and conceptual hierarchy in the syntax, and the code is much harder to comprehend when the way the code is written does not reflect that hierarchy. The performance difference between append() and extend() for code in patchedast.py is basically negligible (patchedast.py isn't a performance sensitive code), so readability should be the main factor on how you should structure the code here. |
f-string was added in 3.6, we now only support 3.7 or higher
node.decorators no longer exists, now we can rely on this being named consistently.
thanks. |
No worries, thank you for your contribution. |
Description
Some refactoring.
It should not change any behavior. (perhaps a tiny bit faster )