---
title: get_attr_bool
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/others/dataflowdevg/udfrefp_23_0036.html
sourcePath: /source/zh/canncommercial/900/others/dataflowdevg/udfrefp_23_0036.html
indexId: c1e6ba3349aebeb8f72ceb0af912d636a0485a075cb5779d78b83458f7192d2770
---
# get_attr_bool

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | x |
| Atlas 推理系列产品 | x |
| Atlas 训练系列产品 | x |


#### 函数功能

获取指定名称的bool类型属性值。


#### 函数原型

```
get_attr_bool(self, name: str) -> Tuple[int, bool]
```


#### 参数说明

| 参数名 | 输入/输出 | 描述 |
| --- | --- | --- |
| name | 输入 | 属性名。 |


#### 返回值

获取返回码及bool类型的属性值。

- 如果该属性存在，返回的Tuple中第一个元素为FLOW_FUNC_SUCCESS，第二个元素为bool类型的属性值。
- 如果属性不存在，Tuple中仅包含错误码一个元素。


#### 异常处理

无


#### 约束说明

无
