Copy the IRModule and add an attribute to it. Parameters ---------- attr_key : str The attribute key. attr_value : Object The new attribute value. Returns ------- mod : IRModule A new copy of the IRModule
(self, attr_key, attr_value)
| 234 | return _ffi_api.Module_GetAttr(self, attr_key) |
| 235 | |
| 236 | def with_attr(self, attr_key, attr_value): |
| 237 | """Copy the IRModule and add an attribute to it. |
| 238 | |
| 239 | Parameters |
| 240 | ---------- |
| 241 | attr_key : str |
| 242 | The attribute key. |
| 243 | |
| 244 | attr_value : Object |
| 245 | The new attribute value. |
| 246 | |
| 247 | Returns |
| 248 | ------- |
| 249 | mod : IRModule |
| 250 | A new copy of the IRModule with the attribute |
| 251 | """ |
| 252 | |
| 253 | return _ffi_api.Module_WithAttr(self, attr_key, attr_value) |
| 254 | |
| 255 | def without_attr(self, attr_key: str) -> "IRModule": |
| 256 | """Copy the IRModule and remove an attribute key and its associated value. |
no outgoing calls