Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 23c0aa2

Browse files
authored
py: fix automatic addition of __doc__ to dict object
Fixes #229.
1 parent 95c8e39 commit 23c0aa2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

py/type.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,7 @@ func (t *Type) Ready() error {
10931093

10941094
// if the type dictionary doesn't contain a __doc__, set it from
10951095
// the tp_doc slot.
1096-
if _, ok := t.Dict["__doc__"]; ok {
1096+
if _, ok := t.Dict["__doc__"]; !ok {
10971097
if t.Doc != "" {
10981098
t.Dict["__doc__"] = String(t.Doc)
10991099
} else {

0 commit comments

Comments
 (0)