Mercurial > public > mercurial-scm > hg
comparison mercurial/posix.py @ 15791:a814f8fcc65a
Use explicit integer division
Found by running the test suite with the -3 flag to show places where
we have int / int division that can be replaced with int // int.
author | Martin Geisler <mg@aragost.com> |
---|---|
date | Sun, 08 Jan 2012 18:15:54 +0100 |
parents | c51c9dc13a58 |
children | 95e45abe7e8e |
comparison
equal
deleted
inserted
replaced
15790:52f816b40674 | 15791:a814f8fcc65a |
---|---|
436 self.stat = os.stat(path) | 436 self.stat = os.stat(path) |
437 | 437 |
438 def cacheable(self): | 438 def cacheable(self): |
439 return bool(self.stat.st_ino) | 439 return bool(self.stat.st_ino) |
440 | 440 |
441 __hash__ = object.__hash__ | |
442 | |
441 def __eq__(self, other): | 443 def __eq__(self, other): |
442 try: | 444 try: |
443 return self.stat == other.stat | 445 return self.stat == other.stat |
444 except AttributeError: | 446 except AttributeError: |
445 return False | 447 return False |