go-python / gpython

gpython is a python interpreter written in go "batteries not included"
BSD 3-Clause "New" or "Revised" License
870 stars 95 forks source link

Instance variables #196

Open wilbertom opened 1 year ago

wilbertom commented 1 year ago

Is there a way to access instance variables from Python.

For example, say I have go struct:

type Point struct {
        X int
        Y int
}

Is there a way to access struct members in python:

print(point.X)

# or
print(point.x)