(self)
| 56 | return result |
| 57 | |
| 58 | def to_python(self): |
| 59 | # note: we assume that error + null checking, etc. will occur on the rust side. |
| 60 | # (it'll probably be much faster there in any case.) |
| 61 | pyargs = ', '.join(a.type.wrap_python_value(a.name) for a in self.args) |
| 62 | |
| 63 | body = f'result = _lib.{self.name}({pyargs})\n' |
| 64 | body += '_check_errors()\n' |
| 65 | body += self.type.python_postfix() |
| 66 | body += 'return result\n' |
| 67 | return Function.pyentry(self.type, self.args, self.name, self.docs) + s(body, indent=4) |
| 68 | |
| 69 | class Method(Function): |
| 70 | '''A function contained within some type.''' |
nothing calls this directly
no test coverage detected