Hi again, On Wed, Nov 23, 2016 at 6:24 PM, Nathaniel Manista <[email protected]> wrote:
> possibly a oneof > <https://developers.google.com/protocol-buffers/docs/proto#using-oneof> that > can communicate exactly one of the id of a found book or the fact that the > book was not found. This makes sense to me, I'll give it a shot! > resp = self.stub.BookGet(library_pb2.BookGetRequest(id='12345')) >> > resp is None # False >> resp.book is None # False >> resp.book.id is None # False >> resp.book.id == '' # True >> >> So I could only make use of the last assertion but that seems far from >> ideal, right? >> > > I think this has to do with the changes in Protocol Buffers 3 and how > fields and messages are never "not present" any more. > Ok, I'm glad to know that was conscious choice and not a bug in my code :) Thank you so much, -- Jesús García Crespo -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/grpc-io. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/CA%2BunNDJ8qVNYq_1sDBEvgpwVT2UOLAzrKp8d38RpZ_ydeGBG%3DQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
