Print human friendly Protobuf message

后端 未结 3 1005
清歌不尽
清歌不尽 2021-02-18 14:23

I couldn\'t find anywhere a possibility to print a human friendly content of a Google Protobuf message.

Is there an equivalent in Python for Java\'s toString()

3条回答
  •  猫巷女王i
    2021-02-18 15:07

    If you're using the protobuf package, the print function/statement will give you a human-readable representation of the message, because of the __str__ method :-).

提交回复
热议问题