🌐 AI搜索 & 代理 主页
Skip to content
Draft
Prev Previous commit
Next Next commit
Merge branch 'master' into patch-10
  • Loading branch information
BobTheBuidler authored Oct 14, 2025
commit 4ea974e3ef5a45afc2902e5c75f455bea9625538
5 changes: 5 additions & 0 deletions mypyc/irbuild/for_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1237,6 +1237,11 @@ def get_expr_length(builder: IRBuilder, expr: Expression) -> int | None:
# TODO: extend this, set and dict comps can be done as well but will
# need special logic to consider the possibility of key conflicts.
# Range, enumerate, zip are all simple logic.

# we might still be able to get the length directly from the type
rtype = builder.node_type(expr)
if isinstance(rtype, RTuple):
return len(rtype.types)
return None


Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.