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

Method canonical

Lib/_pydecimal.py:2880–2886  ·  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

2878 return 0
2879
2880 def canonical(self):
2881 """Returns the same Decimal object.
2882
2883 As we do not have different encodings for the same number, the
2884 received object already is in its canonical form.
2885 """
2886 return self
2887
2888 def compare_signal(self, other, context=None):
2889 """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