MCPcopy Index your code
hub / github.com/python/cpython / _isinteger

Method _isinteger

Lib/_pydecimal.py:2857–2864  ·  view source on GitHub ↗

Returns whether self is an integer

(self)

Source from the content-addressed store, hash-verified

2855 return ans._fix(context)
2856
2857 def _isinteger(self):
2858 """Returns whether self is an integer"""
2859 if self._is_special:
2860 return False
2861 if self._exp >= 0:
2862 return True
2863 rest = self._int[self._exp:]
2864 return rest == '0'*len(rest)
2865
2866 def _iseven(self):
2867 """Returns True if self is even. Assumes self is an integer."""

Callers 3

_power_moduloMethod · 0.95
_power_exactMethod · 0.80
__pow__Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected