diff options
author | Richard Maw <richard.maw@gmail.com> | 2014-09-18 15:29:34 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@gmail.com> | 2014-09-19 12:43:26 +0000 |
commit | e3400ec5a25b5163293adcb0d007d0a8cae53a4c (patch) | |
tree | 21809ec87b4ecfb64d8866dabc40d07780532289 /morphlib/buildcommand.py | |
parent | 960c84e111111d0b203d6aa16f23552cc9978c99 (diff) | |
download | morph-e3400ec5a25b5163293adcb0d007d0a8cae53a4c.tar.gz |
Make morphologies hashable
I need to be able to deduplicate a list of morphologies. Putting it in a
set is the easiest way, but it needs to be hashable.
It's not included in dicts by default, since they're stored by
reference, and you can change them while they're in the dict, so the
hash value can change.
I don't need to deduplicate morphologies by their contents, just by
reference though, so using `id` as the hash function is sufficient.
Diffstat (limited to 'morphlib/buildcommand.py')
0 files changed, 0 insertions, 0 deletions