Implement Message.__bool__ (#142)
* Implement Message.__bool__ with similar semantics to a collection, such that any value being set on the message (i.e. having a non-default value) make the Message value truthy . Co-authored-by: nat <n@natn.me>
This commit is contained in:
@@ -12,7 +12,7 @@ Message
|
||||
|
||||
.. autoclass:: betterproto.Message
|
||||
:members:
|
||||
:special-members: __bytes__
|
||||
:special-members: __bytes__, __bool__
|
||||
|
||||
|
||||
.. autofunction:: betterproto.serialized_on_wire
|
||||
|
||||
Reference in New Issue
Block a user