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
eb9d418
to
ab03389
Compare
This looks very cool!
As an additional comment/question: would it make sense to move the logic generating the type description from the expr_ty into a function on its own to limit duplication ? I gave it a try at https://pastebin.com/XLZ2B7Cq (not tested whatsoever).
ab03389
to
cfe1a8d
Compare
cfe1a8d
to
8e9dc9c
Compare
| case JoinedStr_kind: | ||
| case FormattedValue_kind: | ||
| return compiler_warn(c, "'%.200s' object is not callable, " | ||
| "perhaps missed a comma?", |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
“perhaps you missed a comma?”
Also use “;” instead of “,” on the previous line.
| case GeneratorExp_kind: | ||
| case Lambda_kind: | ||
| return compiler_warn(c, "'%.200s' object is not subscriptable, " | ||
| "perhaps missed a comma?", |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
|
Thank you @SylvainDe! I also thought about this type of simplification, but was hesitant. I initially implemented this idea independently, but then I seen your nice variant and borrowed it. |
https://bugs.python.org/issue15248