Message299298
In the documentation:
For a general Python object ``number``, ``round(number, ndigits)`` delegates to
``number.__round__(ndigits)``.
Mark, is it worth to mention explicitly that round(number) and round(number, None) delegate to
number.__round__()?
The custom __round__() method should support calling without the argument, but it can not support calling with None. |
|
Date |
User |
Action |
Args |
2017-07-27 09:34:25 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, rhettinger, mark.dickinson, r.david.murray, docs@python, steve.dower, George K |
2017-07-27 09:34:25 | serhiy.storchaka | set | messageid: <1501148065.57.0.601622425505.issue30940@psf.upfronthosting.co.za> |
2017-07-27 09:34:25 | serhiy.storchaka | link | issue30940 messages |
2017-07-27 09:34:25 | serhiy.storchaka | create | |
|