(self, other, recursive=False)
| 40 | properties = ["_start_line", "_end_line", "_start_column", "_end_column"] |
| 41 | |
| 42 | def replace(self, other, recursive=False): |
| 43 | if isinstance(other, Object): |
| 44 | for attr in self.properties: |
| 45 | if not hasattr(self, attr) and hasattr(other, attr): |
| 46 | setattr(self, attr, getattr(other, attr)) |
| 47 | else: |
| 48 | raise TypeError( |
| 49 | "Can't replace a non Hy object '{}' with a Hy object '{}'".format( |
| 50 | repr(other), repr(self) |
| 51 | ) |
| 52 | ) |
| 53 | |
| 54 | return self |
| 55 | |
| 56 | @property |
| 57 | def start_line(self): |
no outgoing calls