(self, key, value, replace=True)
| 305 | """For ConvertingXXX's, this mixin class provides common functions""" |
| 306 | |
| 307 | def convert_with_key(self, key, value, replace=True): |
| 308 | result = self.configurator.convert(value) |
| 309 | #If the converted value is different, save for next time |
| 310 | if value is not result: |
| 311 | if replace: |
| 312 | self[key] = result |
| 313 | if type(result) in (ConvertingDict, ConvertingList, |
| 314 | ConvertingTuple): |
| 315 | result.parent = self |
| 316 | result.key = key |
| 317 | return result |
| 318 | |
| 319 | def convert(self, value): |
| 320 | result = self.configurator.convert(value) |
no test coverage detected