Whole file
ramazanpolat/prodict
The author described this change as “Fixes issue #3; unknown keys now raise KeyError”. It counts as a record because the check below fails on the code as it stood at 6485d9c99 and passes on 417bab337, with nothing else changed between the two runs.
Projectramazanpolat/prodict
Fix saved2020-07-12
Sharing licenceMIT · LICENSE.txt
Change size+1 −1
What the code was meant to do, written into the code itself as a save note
Fixes issue #3; unknown keys now raise KeyError
The change
| 206 | 206 | ||
| 207 | 207 | def __getattr__(self, item): | |
| 208 | 208 | # print('__getattr__("{}")'.format(item)) | |
| 209 | - | return self.get(item, None) | |
| 209 | + | return self[item] | |
| 210 | 210 | ||
| 211 | 211 | # def __getattribute__(self, item): | |
| 212 | 212 | # print('__getattribute__("{}")'.format(item)) |
The check that tells the two apart
fail→pass·test_prodict.py::test_unknown_attr
Check file test_prodict.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 it6485d9c9939e5c6f6b3cd5d5af3e7955d1ec470a
Broken version dated2020-05-08
Moduleprodict.__init__
Units changedProdict
Fingerprintdde5e382e31e242e
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.