PyDocs

Nav

Python Runtime Services

object.__round__

builtins

method of object
  • object.__round__(self[, ndigits])
Called to implement the built-in function round() and math functions trunc(), floor() and ceil(). Unless ndigits is passed to __round__() all these methods should return the value of the object truncated to an Integral (typically an int).
Changed in 3.14
  • 3.14: int() no longer delegates to the __trunc__() method.
0 Examples
No examples for builtins/object.__round__.
See Also
No see-alsos for builtins/object.__round__
0 Notes
No notes for object.__round__