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

Method _iseven

Lib/_pydecimal.py:2863–2867  ·  view source on GitHub ↗

Returns True if self is even. Assumes self is an integer.

(self)

Source from the content-addressed store, hash-verified

2861 return rest == '0'*len(rest)
2862
2863 def _iseven(self):
2864 """Returns True if self is even. Assumes self is an integer."""
2865 if not self or self._exp > 0:
2866 return True
2867 return self._int[-1+self._exp] in '02468'
2868
2869 def adjusted(self):
2870 """Return the adjusted exponent of self"""

Callers 2

_power_moduloMethod · 0.80
__pow__Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected