Skip to content

Commit

Permalink
Merge pull request jiaaro#296 from craigthelinguist/master
Browse files Browse the repository at this point in the history
Fix python 2 hashing incompatibility
  • Loading branch information
jiaaro committed Jun 29, 2018
2 parents 71a19bd + 5bc2dac commit da21c38
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,6 @@ Sérgio Agostinho

Antonio Larrosa
github: antlarr

Aaron Craig
github: craigthelinguist
3 changes: 3 additions & 0 deletions pydub/audio_segment.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,9 @@ def __eq__(self, other):
except:
return False

def __hash__(self):
return hash(AudioSegment) ^ hash((self.channels, self.frame_rate, self.sample_width, self._data))

def __ne__(self, other):
return not (self == other)

Expand Down

0 comments on commit da21c38

Please sign in to comment.