Abjad/abjad — pull request #365 by tiagoantao (2014-03-29 21:10:51+00:00)
Title: Adding __hash__'s where there are __eq__'s

I have now took a completely different approach: As there are 144 files which need this patch, I did an automated patcher (a piece of code to patch the code - talk about metaprogramming ;) ).
The code introduces a docstring like you requested (I can easily change it if something is amiss - the joys of automated patching - just say).

The code also places the __hash__ function as best as possible, but in some cases it is not perfect (especially if the class itself is not ordered to start with - a few cases).

Doing this manually would be a lot of grunt work. But I can tweak the automated patcher further if needed (though I doubt I would get a perfect placement for __hash__ all the time).

After this patch 142 tests fail of 8886. Of these 35 are string/byte issues (trivial), plenty are sort issues. I continue to believe that no serious problem will occur (on abjad/, did not look at experimental and scoretools/)