MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / B

Class B

test/sql/test_external_traversal.py:89–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87 return "A(%s)" % repr(self.expr)
88
89 class B(ClauseElement):
90 __visit_name__ = "b"
91
92 def __init__(self, *items):
93 self.items = items
94
95 def is_other(self, other):
96 if other is not self:
97 return False
98 for i1, i2 in zip(self.items, other.items):
99 if i1 is not i2:
100 return False
101 return True
102
103 __hash__ = ClauseElement.__hash__
104
105 def __eq__(self, other):
106 for i1, i2 in zip(self.items, other.items):
107 if i1 != i2:
108 return False
109 return True
110
111 def __ne__(self, other):
112 for i1, i2 in zip(self.items, other.items):
113 if i1 != i2:
114 return True
115 return False
116
117 def _copy_internals(self, clone=_clone, **kw):
118 self.items = [clone(i, **kw) for i in self.items]
119
120 def get_children(self, **kwargs):
121 return self.items
122
123 def __str__(self):
124 return "B(%s)" % repr([str(i) for i in self.items])
125
126 def test_test_classes(self):
127 a1 = A("expr1")

Callers 4

test_test_classesMethod · 0.70
test_cloneMethod · 0.70
test_no_cloneMethod · 0.70
test_change_in_placeMethod · 0.70

Calls

no outgoing calls

Tested by 4

test_test_classesMethod · 0.56
test_cloneMethod · 0.56
test_no_cloneMethod · 0.56
test_change_in_placeMethod · 0.56