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

Method set_undefined_value

mypyc/codegen/emit.py:372–377  ·  view source on GitHub ↗
(self, target: str, rtype: RType)

Source from the content-addressed store, hash-verified

370 return ctype + " "
371
372 def set_undefined_value(self, target: str, rtype: RType) -> None:
373 if isinstance(rtype, RVec):
374 self.emit_line(f"{target}.len = -1;")
375 self.emit_line(f"{target}.items = NULL;")
376 else:
377 self.emit_line(f"{target} = {self.c_undefined_value(rtype)};")
378
379 def c_undefined_value(self, rtype: RType) -> str:
380 if not rtype.is_unboxed:

Callers 3

generate_setup_for_classFunction · 0.80
generate_setterFunction · 0.80

Calls 3

emit_lineMethod · 0.95
c_undefined_valueMethod · 0.95
isinstanceFunction · 0.85

Tested by

no test coverage detected