MCPcopy Index your code
hub / github.com/python/mypy / _get_vec_capacity

Function _get_vec_capacity

mypyc/irbuild/expression.py:578–583  ·  view source on GitHub ↗

Extract the 'capacity' keyword argument value from a vec() call, or None.

(builder: IRBuilder, expr: CallExpr)

Source from the content-addressed store, hash-verified

576
577
578def _get_vec_capacity(builder: IRBuilder, expr: CallExpr) -> Value | None:
579 """Extract the 'capacity' keyword argument value from a vec() call, or None."""
580 for i, (kind, name) in enumerate(zip(expr.arg_kinds, expr.arg_names)):
581 if kind == ARG_NAMED and name == "capacity":
582 return builder.accept(expr.args[i])
583 return None
584
585
586def translate_vec_create_from_iterable(

Callers 1

transform_call_exprFunction · 0.85

Calls 3

enumerateFunction · 0.85
zipFunction · 0.85
acceptMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…