Whole file
mewwts/addict
The author described this change as “Should fix #85, #86 and #88”. It counts as a record because the check below fails on the code as it stood at 2540b0ed2 and passes on 67454531b, with nothing else changed between the two runs.
Projectmewwts/addict
Fix saved2017-03-05
Sharing licenceMIT · LICENSE
Change size+4 −2
What the code was meant to do, written into the code itself as a save note
Should fix #85, #86 and #88
The change
| 35 | 35 | except AttributeError: | |
| 36 | 36 | p = None | |
| 37 | 37 | key = None | |
| 38 | - | if p is not None and key: | |
| 39 | - | p.__setattr__(key, self) | |
| 38 | + | if p is not None and key is not None: | |
| 39 | + | p[key] = self | |
| 40 | + | object.__delattr__(self, '__parent') | |
| 41 | + | object.__delattr__(self, '__key') | |
| 40 | 42 | ||
| 41 | 43 | def __add__(self, other): | |
| 42 | 44 | if not self.keys(): |
The check that tells the two apart
fail→pass·test_addict.py::Tests::test_parent_key_item
Check file test_addict.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before it2540b0ed240643b2fc28e0d9045f8248e97c08e9
Broken version dated2017-02-25
Moduleaddict.addict
Units changedDict
Fingerprint35144f471bb81167
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.
Other bugs found in mewwts/addict
- 2014-12-14Dict