8000 Add __str__ for None · go-python/gpython@1455b43 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1455b43

Browse files
committed
Add __str__ for None
1 parent 3729af3 commit 1455b43

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

py/none.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,10 @@ func (a NoneType) M__bool__() Object {
1919
return False
2020
}
2121

22+
func (a NoneType) M__str__() Object {
23+
return String("None")
24+
}
25+
2226
// Check interface is satisfied
2327
var _ I__bool__ = None
28+
var _ I__str__ = None

0 commit comments

Comments
 (0)
0