Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ D
Class
D
Lib/test/test_decimal.py:1996–1997 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1994
def
__hash__(self):
1995
return
42
1996
class
D(Decimal, H):
1997
pass
1998
value = D(
'NaN'
)
1999
self.assertEqual(hash(value), object.__hash__(value))
2000
Callers
13
inner
Function · 0.90
int_to_decimal
Function · 0.90
_dec_str_to_int_inner
Function · 0.90
test_integers
Method · 0.90
test_binary_floats
Method · 0.90
test_decimals
Method · 0.90
test_mixed_comparisons
Method · 0.90
test_complex
Method · 0.90
testDist
Method · 0.90
test_parse_float
Method · 0.90
test_decimal_fraction_comparison
Method · 0.70
test_hash_method_nan
Method · 0.70
Calls
no outgoing calls
Tested by
10
test_integers
Method · 0.72
test_binary_floats
Method · 0.72
test_decimals
Method · 0.72
test_mixed_comparisons
Method · 0.72
test_complex
Method · 0.72
testDist
Method · 0.72
test_parse_float
Method · 0.72
test_decimal_fraction_comparison
Method · 0.56
test_hash_method_nan
Method · 0.56
test_named_parameters
Method · 0.56