MCPcopy Create free account
hub / github.com/go-python/gopy / pySafeArg

Function pySafeArg

bind/symbols.go:91–96  ·  view source on GitHub ↗

pySafeArg returns an arg name that python will not barf on

(anm string, idx int)

Source from the content-addressed store, hash-verified

89
90// pySafeArg returns an arg name that python will not barf on
91func pySafeArg(anm string, idx int) string {
92 if anm == "" {
93 anm = fmt.Sprintf("arg_%d", idx)
94 }
95 return pySafeName(anm)
96}
97
98// isPyCompatVar checks if var is compatible with python
99func isPyCompatVar(v *symbol) error {

Callers 4

buildTupleMethod · 0.85
addSignatureTypeMethod · 0.85
genFuncSigMethod · 0.85
genFuncBodyMethod · 0.85

Calls 1

pySafeNameFunction · 0.85

Tested by

no test coverage detected