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

Method __round__

extra_tests/snippets/builtin_round.py:39–40  ·  view source on GitHub ↗
(self, ndigits=None)

Source from the content-addressed store, hash-verified

37
38class X:
39 def __round__(self, ndigits=None):
40 return 1.1
41
42
43assert round(X(), 1) == 1.1

Callers 3

builtin_float.pyFile · 0.45
builtin_int.pyFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected