Let's say I have some capnp schema.capnp file:

```
struct Foo {
   bar :group {
       someValue @0 :Int64;
   }
}
```

In python I do something like:

```
import capnp
import schema_capnp

fp = open("some_capture.bin")
obj = schema_capnp.Foo.read(fp)
copied_bar = copy(obj.bar) <--- Here
```

I'm trying to figure out how to create the copied_bar object without really 
having to know what the underlying type is. The specific use-case is I have 
covariant groups in different structs so it's a little more complex than 
this simple case. I want to create a copy so that I'm not accidentally 
modifying the underlying instance (I recognize there's a reader in this 
case which probably won't allow modifying - I'm talking about the general 
case).

Thanks,
Vitali

-- 
You received this message because you are subscribed to the Google Groups 
"Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to capnproto+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/capnproto/140c3ca6-a488-4aa2-9127-30dc266f0142%40googlegroups.com.

Reply via email to