-
-
Notifications
You must be signed in to change notification settings - Fork 3k
[mypyc] feat: extend get_expr_length
for listcomp and genexp [4/4]
#19928
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
base: master
Are you sure you want to change the base?
Conversation
and isinstance(expr.node, Var) | ||
and expr.node.is_final | ||
and isinstance(expr.node.final_value, str) | ||
and expr.node.has_explicit_value |
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.
I realized when looking that this line is unnecessary if the above checks pass
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.
#19930 renders this irrelevant
get_expr_length
for listcomp and genexp
r6 = r26 | ||
goto L1 | ||
L8: | ||
r27 = var_object_size r0 |
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.
This doesn't look right, should be 9
get_expr_length
for listcomp and genexpget_expr_length
for listcomp and genexp [4/4]
This PR extends
get_expr_length
to work with ListComprehension and GeneratorExpression.All of the
get_expr_length
PRs are entirely independent and can be reviewed/merged in any order.