| 2478 | @classmethod |
| 2479 | def setup_classes(cls): |
| 2480 | class Point(cls.Basic): |
| 2481 | def __init__(self, x, y): |
| 2482 | self.x = x |
| 2483 | self.y = y |
| 2484 | |
| 2485 | def __composite_values__(self): |
| 2486 | return [self.x, self.y] |
| 2487 | |
| 2488 | __hash__ = None |
| 2489 | |
| 2490 | def __eq__(self, other): |
| 2491 | return ( |
| 2492 | isinstance(other, Point) |
| 2493 | and other.x == self.x |
| 2494 | and other.y == self.y |
| 2495 | ) |
| 2496 | |
| 2497 | def __ne__(self, other): |
| 2498 | return not isinstance(other, Point) or not self.__eq__(other) |
| 2499 | |
| 2500 | class Graph(cls.DeclarativeBasic): |
| 2501 | __tablename__ = "graph" |
no outgoing calls