We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 48ebc0d commit 3e31189Copy full SHA for 3e31189
mypyc/irbuild/for_helpers.py
@@ -1203,7 +1203,7 @@ def get_expr_length(expr: Expression) -> int | None:
1203
return len(expr.node.final_value)
1204
elif isinstance(expr, CallExpr) and isinstance(callee := expr.callee, NameExpr):
1205
fullname = callee.fullname
1206
- if fullname == "builtins.enumerate" and len(expr.args) == 1:
+ if fullname in ("builtins.list", "builtins.tuple", "builtins.enumerate") and len(expr.args) == 1:
1207
return get_expr_length(expr.args[0])
1208
elif fullname == "builtins.map" and len(expr.args) == 2:
1209
return get_expr_length(expr.args[1])
0 commit comments