MCPcopy Index your code
hub / github.com/go-python/gopy / processTuple

Method processTuple

bind/symbols.go:590–607  ·  view source on GitHub ↗

processTuple ensures that all types in a tuple are in sym table

(tuple *types.Tuple)

Source from the content-addressed store, hash-verified

588
589// processTuple ensures that all types in a tuple are in sym table
590func (sym *symtab) processTuple(tuple *types.Tuple) error {
591 if tuple == nil {
592 return nil
593 }
594 for i := 0; i < tuple.Len(); i++ {
595 ivar := tuple.At(i)
596 ityp := ivar.Type()
597 isym := sym.symtype(ityp)
598 if isym != nil {
599 continue
600 }
601 err := sym.addType(ivar, ityp)
602 if err != nil {
603 return err
604 }
605 }
606 return nil
607}
608
609// buildTuple returns a string of Go code that builds a PyTuple
610// for the given tuple (e.g., function args).

Callers 2

addSymbolMethod · 0.95
addMethodMethod · 0.95

Calls 3

symtypeMethod · 0.95
addTypeMethod · 0.95
AtMethod · 0.45

Tested by

no test coverage detected