Calls the function with a dictionary of named arguments. Args: named_args: A dictionary of named arguments to pass to the function. Returns: A ComputedObject representing the called function. If the signature specifies a recognized return type, the returned value will be
(self, named_args: dict[str, Any])
| 63 | return self.apply(self.nameArgs(args, kwargs)) |
| 64 | |
| 65 | def apply(self, named_args: dict[str, Any]) -> computedobject.ComputedObject: |
| 66 | """Calls the function with a dictionary of named arguments. |
| 67 | |
| 68 | Args: |
| 69 | named_args: A dictionary of named arguments to pass to the function. |
| 70 | |
| 71 | Returns: |
| 72 | A ComputedObject representing the called function. If the signature |
| 73 | specifies a recognized return type, the returned value will be cast |
| 74 | to that type. |
| 75 | """ |
| 76 | result = computedobject.ComputedObject(self, self.promoteArgs(named_args)) |
| 77 | return Function._promoter(result, self.getReturnType()) |
| 78 | |
| 79 | def promoteArgs(self, args: dict[str, Any]) -> dict[str, Any]: |
| 80 | """Promotes arguments to their types based on the function's signature. |
no test coverage detected