Comment #6 on issue 189 by Generated message __cmp__() in Python should consistently order generated messages

I think most users would find that behavior surprising. Documenting the behavior isn't good enough -- developers will often make assumptions about things that seem
"obvious" without reading the docs.

Some problems with implementing comparison "correctly":

1) What is correct? Different people will have different answers. Should we compare each field in order? Which order? Declaration order, or field number order? Etc.
Different apps will have different needs.

2) If we ever implement unknown field retention in Python (as we have in C++ and
Java), how do we compare them?  Without knowing the type of the fields, any
comparison approach is arbitrary and possibly wrong.

You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to