@box(types.NamedTuple)
@box(types.NamedUniTuple)
def box_namedtuple(typ, val, c):
 cls_obj = c.pyapi.unserialize(c.pyapi.serialize_object(typ.instance_class))
 tuple_obj = box_tuple(typ, val, c)
 obj = c.pyapi.call(cls_obj, tuple_obj)
 c.pyapi.decref(cls_obj)
 c.pyapi.decref(tuple_obj)
 return obj

@ box ( types . NamedTuple ) @ box ( types . NamedUniTuple ) def box_namedtuple ( typ , val , c ) : cls_obj = c . pyapi . unserialize ( c . pyapi . serialize_object ( typ . instance_class ) ) tuple_obj = box_tuple ( typ , val , c ) obj = c . pyapi . call ( cls_obj , tuple_obj ) c . pyapi . decref ( cls_obj ) c . pyapi . decref ( tuple_obj ) return obj
convert native array or structure *val* to a namedtuple object .