Add Path.__lt__ so they are sortable.
This commit is contained in:
parent
5412af7d90
commit
3a5e160504
1 changed files with 3 additions and 0 deletions
|
@ -99,6 +99,9 @@ class Path:
|
||||||
def __hash__(self):
|
def __hash__(self):
|
||||||
return hash(self.normcase)
|
return hash(self.normcase)
|
||||||
|
|
||||||
|
def __lt__(self, other):
|
||||||
|
return self.absolute_path < other.absolute_path
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return '{c}({path})'.format(c=self.__class__.__name__, path=repr(self.absolute_path))
|
return '{c}({path})'.format(c=self.__class__.__name__, path=repr(self.absolute_path))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue