| 501 | ) |
| 502 | |
| 503 | def __repr__(self): |
| 504 | args = ", ".join(str(i) for i in self.args[1:]) |
| 505 | kwargs = ", ".join("{}={}".format(k, v) for k, v in self.kwargs.items()) |
| 506 | outputs = self.outputs |
| 507 | if self.out_def: |
| 508 | outputs = self.out_def.unflatten(outputs) |
| 509 | method = ".%s" % self.method |
| 510 | if method == ".__call__": |
| 511 | method = "" |
| 512 | return "%{}:\t{}{}{}({})".format( |
| 513 | self._id, |
| 514 | str(outputs) + " = " if outputs else "", |
| 515 | self.args[0], |
| 516 | method, |
| 517 | ", ".join([args, kwargs]), |
| 518 | ) |
| 519 | |
| 520 | def __getstate__(self): |
| 521 | state = { |