Skip to content

Commit

Permalink
source.Range: make hashable.
Browse files Browse the repository at this point in the history
  • Loading branch information
whitequark committed Aug 10, 2015
1 parent 6749f63 commit aee2f09
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pythonparser/source.py
Expand Up @@ -192,6 +192,9 @@ def __ne__(self, other):
"""
return not (self == other)

def __hash__(self):
return hash((self.source_buffer, self.begin_pos, self.end_pos))

class Comment:
"""
A comment in the source code.
Expand Down

0 comments on commit aee2f09

Please sign in to comment.