Message342180
> 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__`). |
|
Date |
User |
Action |
Args |
2019-05-11 10:28:53 | mark.dickinson | set | recipients:
+ mark.dickinson, docs@python, pablogsal, Scaler |
2019-05-11 10:28:53 | mark.dickinson | set | messageid: <1557570533.72.0.215381795955.issue36879@roundup.psfhosted.org> |
2019-05-11 10:28:53 | mark.dickinson | link | issue36879 messages |
2019-05-11 10:28:53 | mark.dickinson | create | |
|