PyDocs

Nav

Python Runtime Services

object.__trunc__

builtins

method of object
  • object.__trunc__(self)
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.__trunc__.
See Also
No see-alsos for builtins/object.__trunc__
0 Notes
No notes for object.__trunc__