From 42db7c7c86a831a2ebb5563b31533e042851e886 Mon Sep 17 00:00:00 2001 From: natanfeitosa Date: Tue, 26 Dec 2023 11:23:13 -0300 Subject: [PATCH 1/2] py: Fix automatic addition of __doc__ to dict object --- main.go | 3 +++ py/type.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 8be7ea2e..b966ffa0 100644 --- a/main.go +++ b/main.go @@ -23,6 +23,9 @@ import ( var ( cpuprofile = flag.String("cpuprofile", "", "Write cpu profile to file") + version = "" + commit = "" + date = "" ) // syntaxError prints the syntax diff --git a/py/type.go b/py/type.go index 509a7628..db31ba61 100644 --- a/py/type.go +++ b/py/type.go @@ -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 { From 14fcffaf2263f2284a9bd37da331dafd8b0b8532 Mon Sep 17 00:00:00 2001 From: Natanael dos Santos Feitosa <52074821+natanfeitosa@users.noreply.github.com> Date: Tue, 26 Dec 2023 13:10:37 -0300 Subject: [PATCH 2/2] Update main.go --- main.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/main.go b/main.go index b966ffa0..8be7ea2e 100644 --- a/main.go +++ b/main.go @@ -23,9 +23,6 @@ import ( var ( cpuprofile = flag.String("cpuprofile", "", "Write cpu profile to file") - version = "" - commit = "" - date = "" ) // syntaxError prints the syntax pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy