You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
so that a user can pass PyObject or other raw Python values to functions. I think we can just use reflect for now instead of providing a higher level value type something like:
type Value interface {
...
}
type RawValue data.Value
... supporting the Value interface in PyObject, etc..
Ideally, we should provide func convertArgsGo2Py(args ...interface{}) (Object, error) { and func invoke(pyObj *C.PyObject, name string, args Object) (data.Value, error) {. Unlike the current invoke, the new invoke doesn't perform argument type conversion so that it becomes easier for users to distinguish type conversion errors and other runtime errors. We can, of course, provide a wrapper function which behaves like the current invoke.
When providing this function, be careful of defining DecRef rules as mentioned in #5 .
The text was updated successfully, but these errors were encountered:
so that a user can pass PyObject or other raw Python values to functions. I think we can just use reflect for now instead of providing a higher level value type something like:
Ideally, we should provide
func convertArgsGo2Py(args ...interface{}) (Object, error) {
andfunc invoke(pyObj *C.PyObject, name string, args Object) (data.Value, error) {
. Unlike the current invoke, the new invoke doesn't perform argument type conversion so that it becomes easier for users to distinguish type conversion errors and other runtime errors. We can, of course, provide a wrapper function which behaves like the currentinvoke
.When providing this function, be careful of defining DecRef rules as mentioned in #5 .
The text was updated successfully, but these errors were encountered: