Skip to content

Commit

Permalink
py: fix automatic addition of __doc__ to dict object
Browse files Browse the repository at this point in the history
Fixes #229.
  • Loading branch information
natanfeitosa authored Dec 26, 2023
1 parent 95c8e39 commit 23c0aa2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,7 @@ func (t *Type) Ready() error {

// if the type dictionary doesn't contain a __doc__, set it from
// the tp_doc slot.
if _, ok := t.Dict["__doc__"]; ok {
if _, ok := t.Dict["__doc__"]; !ok {
if t.Doc != "" {
t.Dict["__doc__"] = String(t.Doc)
} else {
Expand Down

0 comments on commit 23c0aa2

Please sign in to comment.