[docs] [issue10289] Document magic methods called by built-in functions

Mark Dickinson report at bugs.python.org
Mon Jul 7 20:05:31 CEST 2014


Mark Dickinson added the comment:

Should the Python 2.7 delegation of `round` to `__float__` for its input also be described as part of this issue?

>>> class A(object):
...     def __float__(self): return 1729.1
... 
>>> round(A())
1729.0

----------
nosy: +mark.dickinson

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10289>
_______________________________________


More information about the docs mailing list