Assign other to itself. Args: other: another subgraph-view. Returns: A new instance identical to the original one. Raises: TypeError: if other is not an SubGraphView.
(self, other)
| 232 | return result |
| 233 | |
| 234 | def _assign_from(self, other): |
| 235 | """Assign other to itself. |
| 236 | |
| 237 | Args: |
| 238 | other: another subgraph-view. |
| 239 | Returns: |
| 240 | A new instance identical to the original one. |
| 241 | Raises: |
| 242 | TypeError: if other is not an SubGraphView. |
| 243 | """ |
| 244 | if not isinstance(other, SubGraphView): |
| 245 | raise TypeError("Expected SubGraphView, got: {}".format(type(other))) |
| 246 | # pylint: disable=protected-access |
| 247 | self._graph = other._graph |
| 248 | self._ops = list(other._ops) |
| 249 | self._passthrough_ts = list(other._passthrough_ts) |
| 250 | self._input_ts = list(other._input_ts) |
| 251 | self._output_ts = list(other._output_ts) |
| 252 | # pylint: enable=protected-access |
| 253 | |
| 254 | def copy(self): |
| 255 | """Return a copy of itself. |
no test coverage detected