This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients Scaler, docs@python, mark.dickinson, pablogsal
Date 2019-05-11.10:28:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1557570533.72.0.215381795955.issue36879@roundup.psfhosted.org>
In-reply-to
Content
> 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__`).
History
Date User Action Args
2019-05-11 10:28:53mark.dickinsonsetrecipients: + mark.dickinson, docs@python, pablogsal, Scaler
2019-05-11 10:28:53mark.dickinsonsetmessageid: <1557570533.72.0.215381795955.issue36879@roundup.psfhosted.org>
2019-05-11 10:28:53mark.dickinsonlinkissue36879 messages
2019-05-11 10:28:53mark.dickinsoncreate