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

Function abs

Lib/operator.py:79–81  ·  view source on GitHub ↗

Same as abs(a).

(a)

Source from the content-addressed store, hash-verified

77# Mathematical/Bitwise Operations *********************************************#
78
79def abs(a):
80 "Same as abs(a)."
81 return _abs(a)
82
83def add(a, b):
84 "Same as a + b."

Callers 15

Int2APFunction · 0.70
currencyFunction · 0.70
__new__Method · 0.70
pluralMethod · 0.70
repr_intMethod · 0.70
triangular_kernelFunction · 0.70
f_invFunction · 0.70
_cmpFunction · 0.70
_hash_algorithmFunction · 0.70
_round_to_exponentFunction · 0.70
_round_to_figuresFunction · 0.70
_format_generalMethod · 0.70

Calls

no outgoing calls

Tested by 15

testApproximatePiMethod · 0.40
testApproximateCos1Method · 0.40
test_mathMethod · 0.40
fooMethod · 0.40
fooMethod · 0.40
__eq__Method · 0.40
test_computationsMethod · 0.40
test_utcnowMethod · 0.40
test_tzinfo_nowMethod · 0.40
truedivFunction · 0.40