Skip to content

Commit 43c7838

Browse files
committed
py: implement __eq__ and __ne__ for Ellipsis
1 parent 069f460 commit 43c7838

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

py/ellipsis.go

+14
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,17 @@ func (a EllipsisType) M__str__() Object {
2525
// Check interface is satisfied
2626
var _ I__bool__ = Ellipsis
2727
var _ I__str__ = Ellipsis
28+
29+
func (a EllipsisType) M__eq__(other Object) Object {
30+
if _, ok := other.(EllipsisType); ok {
31+
return True
32+
}
33+
return False
34+
}
35+
36+
func (a EllipsisType) M__ne__(other Object) Object {
37+
if _, ok := other.(EllipsisType); ok {
38+
return False
39+
}
40+
return True
41+
}

0 commit comments

Comments
 (0)