[issue40117] __round__ doesn't behave well with return NotImplemented

Mark Dickinson report at bugs.python.org
Tue Mar 31 06:46:40 EDT 2020


Mark Dickinson <dickinsm at gmail.com> added the comment:

Agreed with Eric and Serhiy. This seems to be a misunderstanding about the scope of NotImplemented.

@Hameer Abbasi: if you have an example of a problem that would be solved by this behaviour change, and which can't be solved simply by raising TypeError or another exception within __round__, feel free to open a discussion on the python-ideas mailing list.

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40117>
_______________________________________


More information about the Python-bugs-list mailing list