Mark Dickinson <dicki...@gmail.com> added the comment:

> Maybe we should add something in the docs regarding the no-restriction point.

IMO, the docs are clear enough (and also long enough) already here. Just as 
with most other magic methods, classes from third-party packages can return 
whatever they like. It doesn't seem worth adding specific disclaimers about 
this everywhere that a magic method might be used. Otherwise, we should also 
add corresponding disclaimers about `__floor__`, `__ceil__`, `__trunc__`, 
`__pow__`, and so on, and I think that would just introduce an increase in 
documentation size without any overall increase in clarity or usefulness.

I'd prefer to stick to documenting that there _is_ a restriction where that's 
true (e.g., `__index__` or `__hash__`).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36879>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to