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.

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

3535 except AttributeError:
3636 p = None
3737 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')
4042
4143 def __add__(self, other):
4244 if not self.keys():

The check that tells the two apart

failpass·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