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 veky
Recipients aeros, docs@python, eric.araujo, ezio.melotti, jdemeyer, mdk, rhettinger, veky, willingc
Date 2019-09-02.14:24:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1567434274.73.0.196274883372.issue37934@roundup.psfhosted.org>
In-reply-to
Content
Sorry, I think you still don't understand.

The emulation of double dispatch by single dispatch, with all complications it brings, is the only reason NotImplemented exists. If Python didn't have binary operators (or inheritance), I'm quite sure it wouldn't have NotImplemented. The idea was never "oh, this method isn't supported", but much more precise "this half of protocol, with given ordering of operands according to a class hierarchy, isn't implemented - try the other half".

Of course, you might argue that _once Python has NotImplemented_, it can be used elsewhere - but as I said, I don't think it should be encouraged.
History
Date User Action Args
2019-09-02 14:24:34vekysetrecipients: + veky, rhettinger, ezio.melotti, eric.araujo, docs@python, jdemeyer, willingc, mdk, aeros
2019-09-02 14:24:34vekysetmessageid: <1567434274.73.0.196274883372.issue37934@roundup.psfhosted.org>
2019-09-02 14:24:34vekylinkissue37934 messages
2019-09-02 14:24:34vekycreate