MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / Point

Class Point

test/ext/test_mutable.py:76–99  ·  test/ext/test_mutable.py::Point

Source from the content-addressed store, hash-verified

74
75
76class Point(MutableComposite):
77 def __init__(self, x, y):
78 self.x = x
79 self.y = y
80
81 def __setattr__(self, key, value):
82 object.__setattr__(self, key, value)
83 self.changed()
84
85 def __composite_values__(self):
86 return self.x, self.y
87
88 def __getstate__(self):
89 return self.x, self.y
90
91 def __setstate__(self, state):
92 self.x, self.y = state
93
94 def __eq__(self, other):
95 return (
96 isinstance(other, Point)
97 and other.x == self.x
98 and other.y == self.y
99 )
100
101
102class MyPoint(Point):

Callers 3

coerceMethod · 0.70
setup_mappersMethod · 0.70
test_basicMethod · 0.70

Calls

no outgoing calls

Tested by 3

coerceMethod · 0.56
setup_mappersMethod · 0.56
test_basicMethod · 0.56