[New-bugs-announce] [issue32464] raise NotImplemented vs return NotImplemented

Srinivas Reddy T report at bugs.python.org
Sun Dec 31 06:44:32 EST 2017


New submission from Srinivas  Reddy T <thatiparthysreenivas at gmail.com>:

I ran these queries on cpython repo.

➜  cpython git:(master) ✗ grep -r . -e return  --include=\*.py  | grep NotImplemented | wc -l
196

➜  cpython git:(master) ✗ grep -r . -e raise   --include=\*.py  | grep NotImplemented | wc -l
295

I have always used raise NotImplemented or raise NotImplementedError. But when does it make sense to return NotImplemented?

----------
messages: 309277
nosy: thatiparthy
priority: normal
severity: normal
status: open
title: raise NotImplemented vs return NotImplemented
type: resource usage
versions: Python 3.7, Python 3.8

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


More information about the New-bugs-announce mailing list