Hello,
Following up on the documentation on *Singular Message Fields* (link
<https://protobuf.dev/reference/python/python-generated/#embedded_message>)
and its examples, I’m unclear on passing messages to the initializer.
Building on the existing example:
message Foo { optional Bar bar = 1; } message Bar { optional int32 i = 1; }
I am not supposed to use
foo = Foo() foo.bar = Bar() # WRONG!
but what about
foo = Foo(bar=Bar(i=5))
In this case, will the generated initializer use e.g. correctly?
Much thanks!
Jens
--
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/protobuf/d7777efc-2f8e-4af5-85bd-a46180063e98n%40googlegroups.com.