@lower_getattr_generic(types.BaseNamedTuple)
def namedtuple_getattr(context, builder, typ, value, attr):
 index = typ.fields.index(attr)
 res = builder.extract_value(value, index)
 return impl_ret_borrowed(context, builder, typ[index], res)

@ lower_getattr_generic ( types . BaseNamedTuple ) def namedtuple_getattr ( context , builder , typ , value , attr ) : index = typ . fields . index ( attr ) res = builder . extract_value ( value , index ) return impl_ret_borrowed ( context , builder , typ [ index ] , res )
fetch a namedtuples field .