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

Method canonical

Lib/_pydecimal.py:2877–2883  ·  view source on GitHub ↗

Returns the same Decimal object. As we do not have different encodings for the same number, the received object already is in its canonical form.

(self)

Source from the content-addressed store, hash-verified

2875 return 0
2876
2877 def canonical(self):
2878 """Returns the same Decimal object.
2879
2880 As we do not have different encodings for the same number, the
2881 received object already is in its canonical form.
2882 """
2883 return self
2884
2885 def compare_signal(self, other, context=None):
2886 """Compares self to the other operand numerically.

Callers 4

canonicalMethod · 0.45
test_named_parametersMethod · 0.45
test_canonicalMethod · 0.45
test_c_funcsMethod · 0.45

Calls

no outgoing calls

Tested by 3

test_named_parametersMethod · 0.36
test_canonicalMethod · 0.36
test_c_funcsMethod · 0.36