Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ decimal_round
Method
decimal_round
Lib/test/test_time.py:968–971 ·
view source on GitHub ↗
(self, x)
Source
from the content-addressed store, hash-verified
966
True, unit_to_sec, value_filter)
967
968
def
decimal_round(self, x):
969
d = decimal.Decimal(x)
970
d = d.quantize(1)
971
return
int(d)
972
973
974
class
TestCPyTime(CPyTimeTestCase, unittest.TestCase):
Callers
4
test_FromSecondsObject
Method · 0.80
converter
Method · 0.80
test_AsTimeval_clamp
Method · 0.80
converter
Method · 0.80
Calls
1
quantize
Method · 0.95
Tested by
no test coverage detected