You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are some cool features generated in the pb2 classes like "HasField()" and "WhichOneof()" to check which "oneof" field was/is used in the messages. The dc classes should really have something similar.
The pb2 classes also do stuff like clear all other fields in a "oneof" group when setting one fields. I'm not sure what would happen in Protoplasm in this case since we're going Dataclass -> dict -> PB2 Class so not really setting one field at a time. I'm guessing this will either raise an exception (preferred) or if there are internal loops that just iterate over the dict and set one field at a time, then which oneof field will be retained simply will be the "last" one iterated over, which will be very arbitrary in each case.
The text was updated successfully, but these errors were encountered:
There are some cool features generated in the pb2 classes like "HasField()" and "WhichOneof()" to check which "oneof" field was/is used in the messages. The dc classes should really have something similar.
The pb2 classes also do stuff like clear all other fields in a "oneof" group when setting one fields. I'm not sure what would happen in Protoplasm in this case since we're going Dataclass -> dict -> PB2 Class so not really setting one field at a time. I'm guessing this will either raise an exception (preferred) or if there are internal loops that just iterate over the dict and set one field at a time, then which oneof field will be retained simply will be the "last" one iterated over, which will be very arbitrary in each case.
The text was updated successfully, but these errors were encountered: