| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| Changed the names of the symbol tables for lambda expressions and generator | ||
| expressions to "<lambda>" and "<genexpr>" respectively to avoid conflicts | ||
| with user-defined names. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| Expand Up | @@ -2413,7 +2413,7 @@ symtable_visit_expr(struct symtable *st, expr_ty e) | |
| VISIT_SEQ(st, expr, e->v.Lambda.args->defaults); | ||
| if (e->v.Lambda.args->kw_defaults) | ||
| VISIT_SEQ_WITH_NULL(st, expr, e->v.Lambda.args->kw_defaults); | ||
| if (!symtable_enter_block(st, &_Py_ID(lambda), | ||
| if (!symtable_enter_block(st, &_Py_STR(anon_lambda), | ||
| FunctionBlock, (void *)e, LOCATION(e))) { | ||
| return 0; | ||
| } | ||
| Expand Down Expand Up | @@ -3055,31 +3055,31 @@ symtable_handle_comprehension(struct symtable *st, expr_ty e, | |
| static int | ||
| symtable_visit_genexp(struct symtable *st, expr_ty e) | ||
| { | ||
| return symtable_handle_comprehension(st, e, &_Py_ID(genexpr), | ||
| return symtable_handle_comprehension(st, e, &_Py_STR(anon_genexpr), | ||
| e->v.GeneratorExp.generators, | ||
| e->v.GeneratorExp.elt, NULL); | ||
| } | ||
|
|
||
| static int | ||
| symtable_visit_listcomp(struct symtable *st, expr_ty e) | ||
| { | ||
| return symtable_handle_comprehension(st, e, &_Py_ID(listcomp), | ||
| return symtable_handle_comprehension(st, e, &_Py_STR(anon_listcomp), | ||
|
Comment thread
Copy link
Copy Markdown
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityShould there be tests for this one too?
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityI cannot write them.
Sorry, something went wrong.
All reactions
|
||
| e->v.ListComp.generators, | ||
| e->v.ListComp.elt, NULL); | ||
| } | ||
|
|
||
| static int | ||
| symtable_visit_setcomp(struct symtable *st, expr_ty e) | ||
| { | ||
| return symtable_handle_comprehension(st, e, &_Py_ID(setcomp), | ||
| return symtable_handle_comprehension(st, e, &_Py_STR(anon_setcomp), | ||
| e->v.SetComp.generators, | ||
| e->v.SetComp.elt, NULL); | ||
| } | ||
|
|
||
| static int | ||
| symtable_visit_dictcomp(struct symtable *st, expr_ty e) | ||
| { | ||
| return symtable_handle_comprehension(st, e, &_Py_ID(dictcomp), | ||
| return symtable_handle_comprehension(st, e, &_Py_STR(anon_dictcomp), | ||
| e->v.DictComp.generators, | ||
| e->v.DictComp.key, | ||
| e->v.DictComp.value); | ||
| Expand Down | ||
| Back | FazBrowse Home | New Git URL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityThank you. This hack was ugly.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.