---
title: 函数：set_attr_list_bool
description: "| C函数原型 | aclError aclopSetAttrListBool(aclopAttr \\*attr, const char \\*attrName, int numValues, const uint8\\_t \\*attrValue); |"
url: "https://www.hiascend.com/document/detail/zh/Atlas200IDKA2DeveloperKit/23.0.RC2/Application%20Development%20Guide/aadgp/aclpythondevg_01_0772.html"
---

# 函数：set_attr_list_bool

| C函数原型 | aclError aclopSetAttrListBool(aclopAttr \*attr, const char \*attrName, int numValues, const uint8\_t \*attrValue); |
| --- | --- |
| Python函数 | ret = acl.op.set\_attr\_list\_bool(attr, attr\_name, attr\_value) |
| 函数功能 | 设置bool类型列表的属性值，同步接口。 |
| 输入说明 | attr：int，acl算子属性地址对象, 此对象使用调用acl.op.create\_attr创建。 attr\_name：str，属性名。 attr\_value：同时支持两种数据类型作为输入。 list，list中每个元素的数据类型为int，取值范围为0~255。 numpy，一维数组numpy对象，类型为uint8。 |
| 返回值说明 | ret：int，错误码。 返回0表示成功。 返回其它值表示失败。 |
| 约束说明 | 建议attr\_value使用list数据类型，后续将不支持numpy作为输入。 若attr\_value需使用numpy数组，需要运行环境为python>=3.8且numpy>=1.22.0。 |
