Inplace remove keys from self that are in other. Examples -------- >>> s1 = Struct(a=10,b=30) >>> s2 = Struct(a=40) >>> s1 -= s2 >>> s1 {'b': 30}
(self,other)
| 198 | return sout |
| 199 | |
| 200 | def __isub__(self,other): |
| 201 | """Inplace remove keys from self that are in other. |
| 202 | |
| 203 | Examples |
| 204 | -------- |
| 205 | |
| 206 | >>> s1 = Struct(a=10,b=30) |
| 207 | >>> s2 = Struct(a=40) |
| 208 | >>> s1 -= s2 |
| 209 | >>> s1 |
| 210 | {'b': 30} |
| 211 | """ |
| 212 | for k in other.keys(): |
| 213 | if k in self: |
| 214 | del self[k] |
| 215 | return self |
| 216 | |
| 217 | def __dict_invert(self, data): |
| 218 | """Helper function for merge. |
nothing calls this directly
no outgoing calls
no test coverage detected