Get the block attribute by name. Args: name(str): the attribute name. Returns: block: the block attribute.
(self, name)
| 3943 | return self.desc._block_attr_id(name) |
| 3944 | |
| 3945 | def _block_attr(self, name): |
| 3946 | """ |
| 3947 | Get the block attribute by name. |
| 3948 | |
| 3949 | Args: |
| 3950 | name(str): the attribute name. |
| 3951 | |
| 3952 | Returns: |
| 3953 | block: the block attribute. |
| 3954 | """ |
| 3955 | |
| 3956 | id = self._block_attr_id(name) |
| 3957 | assert id >= 0 and id < len(self.block.program.blocks) |
| 3958 | return self.block.program.blocks[id] |
| 3959 | |
| 3960 | def _blocks_attr(self, name): |
| 3961 | """ |
no test coverage detected