{"modulePath":"github.com/go-python/gpython","version":"v0.2.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package main\n\n## Variables\n\n```go\nvar (\n\tPyVacationStopType = py.NewType(\"Stop\", \"\")\n\tPyVacationType     = py.NewType(\"Vacation\", \"\")\n)\n```\nThese gpython py.Object type delcarations are the bridge between gpython and embedded Go types.\n\n## Functions\n\n```go\nfunc VacationStop_Get(self py.Object, args py.Tuple) (py.Object, error)\n```\nVacationStop\\_Get is an embedded instance method of VacationStop\n\n```go\nfunc VacationStop_Set(self py.Object, args py.Tuple) (py.Object, error)\n```\nVacationStop\\_Set is an embedded instance method of VacationStop\n\n```go\nfunc VacationStop_new(module py.Object, args py.Tuple) (py.Object, error)\n```\n\n```go\nfunc Vacation_add_stops(self py.Object, args py.Tuple) (py.Object, error)\n```\n\n```go\nfunc Vacation_get_stop(self py.Object, args py.Tuple) (py.Object, error)\n```\n\n```go\nfunc Vacation_new(module py.Object, args py.Tuple) (py.Object, error)\n```\n\n```go\nfunc Vacation_num_stops(self py.Object, args py.Tuple) (py.Object, error)\n```\n\n## Types\n\n```go\ntype Vacation struct {\n\tStops  []*VacationStop\n\tMadeBy string\n}\n```\n\n```go\nfunc (v *Vacation) Type() *py.Type\n```\n\n```go\ntype VacationStop struct {\n\tDesc      py.String\n\tNumNights py.Int\n}\n```\nVacationStop is an example Go struct to embed.\n\n```go\nfunc (stop *VacationStop) M__repr__() (py.Object, error)\n```\n\n```go\nfunc (stop *VacationStop) M__str__() (py.Object, error)\n```\n\n```go\nfunc (stop *VacationStop) Type() *py.Type\n```\nType comprises the py.Object interface, allowing a Go struct to be cast as a py.Object. Instance methods of an type are then attached to this type object\n\n","path":"github.com/go-python/gpython/examples/embedding","name":"main","synopsis":"","isRedistributable":true}
