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‎

Lines changed: 14 additions & 0 deletions
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 (aEllipsisType) M__eq__(otherObject) Object{
30+
if_, ok:=other.(EllipsisType); ok{
31+
returnTrue
32+
}
33+
returnFalse
34+
}
35+
36+
func (aEllipsisType) M__ne__(otherObject) Object{
37+
if_, ok:=other.(EllipsisType); ok{
38+
returnFalse
39+
}
40+
returnTrue
41+
}

0 commit comments

Comments
(0)