MCPcopy Index your code
hub / github.com/RustPython/RustPython / _isinteger

Method _isinteger

Lib/_pydecimal.py:2854–2861  ·  view source on GitHub ↗

Returns whether self is an integer

(self)

Source from the content-addressed store, hash-verified

2852 return ans._fix(context)
2853
2854 def _isinteger(self):
2855 """Returns whether self is an integer"""
2856 if self._is_special:
2857 return False
2858 if self._exp >= 0:
2859 return True
2860 rest = self._int[self._exp:]
2861 return rest == '0'*len(rest)
2862
2863 def _iseven(self):
2864 """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 1

lenFunction · 0.85

Tested by

no test coverage detected