Commit 5f6b24a
authored
docs: Clarify semantics of multiple oneof variants passed to msg ctor (#263)
Example:
import proto
class Song(proto.Message):
name = proto.Field(proto.STRING, number=1, oneof="identifier")
database_id = proto.Field(proto.STRING, number=2, oneof="identifier")
s = Song(name="Canon in D minor", database_id="b5a37aad3")
assert "database_id" in s and "name" not in s
s = Song(database_id="e6aa708c7e", name="Little Fugue")1 parent e66207e commit 5f6b24a
1 file changed
+28
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
154 | 181 | | |
155 | 182 | | |
156 | 183 | | |
| |||
199 | 226 | | |
200 | 227 | | |
201 | 228 | | |
202 | | - | |
203 | | - | |
| 229 | + | |
0 commit comments