| 1282 | |
| 1283 | |
| 1284 | class _Pair: |
| 1285 | # Internal class to represent a pair of expressions |
| 1286 | |
| 1287 | def __init__(self, left, right): |
| 1288 | self.left = left |
| 1289 | self.right = right |
| 1290 | |
| 1291 | def substitute(self, symbols_map): |
| 1292 | left, right = self.left, self.right |
| 1293 | if isinstance(left, Expr): |
| 1294 | left = left.substitute(symbols_map) |
| 1295 | if isinstance(right, Expr): |
| 1296 | right = right.substitute(symbols_map) |
| 1297 | return _Pair(left, right) |
| 1298 | |
| 1299 | def __repr__(self): |
| 1300 | return f'{type(self).__name__}({self.left}, {self.right})' |
| 1301 | |
| 1302 | |
| 1303 | class _FromStringWorker: |
no outgoing calls
no test coverage detected
searching dependent graphs…