Open
Description
For years I've favored writing code shaped like
my_message = my_module_pb2.MyMessage(my_first_attribute=3, my_second_attribute=4)
rather than
my_message = my_module_pb2.MyMessage()
my_message.my_first_attribute = 3
my_message.my_second_attribute = 4
. Are these construction semantics documented anywhere? Could they be, along with the similar semantics of
my_message.repeated_sub_message.add(up='↑', down='↓')
rather than
my_sub_message = my_message.repeated_sub_message.add()
my_sub_message.up = '↑'
my_sub_message.down = '↓'
?
Would this page be the right place for such documentation?