Get function from the module. Parameters ---------- name The name of the function query_imports Whether to also query modules imported by this module. Returns ------- The result function.
(self, name: str, query_imports: bool = False)
| 170 | return func |
| 171 | |
| 172 | def get_function(self, name: str, query_imports: bool = False) -> core.Function: |
| 173 | """Get function from the module. |
| 174 | |
| 175 | Parameters |
| 176 | ---------- |
| 177 | name |
| 178 | The name of the function |
| 179 | |
| 180 | query_imports |
| 181 | Whether to also query modules imported by this module. |
| 182 | |
| 183 | Returns |
| 184 | ------- |
| 185 | The result function. |
| 186 | |
| 187 | """ |
| 188 | func = _ffi_api.ModuleGetFunction(self, name, query_imports) |
| 189 | func = cast(core.Function, func) |
| 190 | if func is None: |
| 191 | raise AttributeError(f"Module has no function '{name}'") |
| 192 | return func |
| 193 | |
| 194 | def get_function_metadata( |
| 195 | self, name: str, query_imports: bool = False |
no outgoing calls