Skip to content

Commit 21ce8b6

Browse files
committed
Remove redundant type checking
1 parent 0dac5c1 commit 21ce8b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sage/rings/integer.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2852,12 +2852,12 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement):
28522852
except (ValueError, TypeError):
28532853
pass
28542854

2855-
if isinstance(m, Integer) and isinstance(self, Integer):
2855+
if isinstance(m, Integer):
28562856
elog = self.exact_log(m)
28572857
if elog == -sage.rings.infinity.infinity or m**elog == self:
28582858
return elog
28592859

2860-
if (isinstance(m, Rational) and isinstance(self, Integer)
2860+
if (isinstance(m, Rational):
28612861
and m.numer() == 1):
28622862
elog = -self.exact_log(m.denom())
28632863
if m**elog == self:

0 commit comments

Comments
 (0)