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 jdemeyer
Recipients aeros, docs@python, eric.araujo, ezio.melotti, jdemeyer, mdk, rhettinger, veky, willingc
Date 2019-09-04.19:03:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1567623806.13.0.84774445162.issue37934@roundup.psfhosted.org>
In-reply-to
Content
> As you say, we currently have only one usage of NotImplemented outside its intended purpose.

I know at least 3 in CPython, so it's not so rare to use NotImplemented for something else than binary operators:
1. __subclasshook__
2. reducer_override (in pickling)
3. __length_hint__

> 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.

I'm not saying that it should be actively encouraged, but the documentation shouldn't be limited to just one use case. Given that NotImplemented exists, why shouldn't it be used in more cases to indicate that an operation is not implemented?
History
Date User Action Args
2019-09-04 19:03:26jdemeyersetrecipients: + jdemeyer, rhettinger, ezio.melotti, eric.araujo, docs@python, willingc, veky, mdk, aeros
2019-09-04 19:03:26jdemeyersetmessageid: <1567623806.13.0.84774445162.issue37934@roundup.psfhosted.org>
2019-09-04 19:03:26jdemeyerlinkissue37934 messages
2019-09-04 19:03:25jdemeyercreate