[New-bugs-announce] [issue37934] Docs: Clarify NotImplemented use cases

Kyle Stanley report at bugs.python.org
Fri Aug 23 17:49:06 EDT 2019


New submission from Kyle Stanley <aeros167 at gmail.com>:

In the documentation for the NotImplemented constant (https://docs.python.org/3/library/constants.html#NotImplemented), the only use case mentioned is for binary special methods, (such as object.__eq__(other)). However, based on a conversation in a recent PR (https://github.com/python/cpython/pull/15327#discussion_r316561140), there seems be several other use cases as well.  It's quite useful to utilize when it's desired to express that a particular operation is not supported, without raising an error.

Expanding upon the use cases will provide readers an idea of other cases in which the constant could be useful. Also, the current wording could potentially come across as implying that the _only_ use case for the constant is for binary special methods, and as far as I'm aware, that is not the case.

----------
assignee: docs at python
components: Documentation
keywords: easy
messages: 350333
nosy: aeros167, docs at python, eric.araujo, ezio.melotti, mdk, willingc
priority: normal
severity: normal
stage: needs patch
status: open
title: Docs: Clarify NotImplemented use cases
type: enhancement
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37934>
_______________________________________


More information about the New-bugs-announce mailing list