[New-bugs-announce] [issue22778] list's in-place add doesn't return NotImplemented when appropriate

Ethan Furman report at bugs.python.org
Fri Oct 31 23:07:49 CET 2014


New submission from Ethan Furman:

--> s = []
--> s += 1
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'int' object is not iterable

For comparison, when NotImplemented is appropriately returned the message looks like this:

--> s -= 1
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for -=: 'list' and 'int'

Which is certainly more helpful than "<blank> object is not iterable"

----------
messages: 230396
nosy: ethan.furman
priority: normal
severity: normal
status: open
title: list's in-place add doesn't return NotImplemented when appropriate
type: behavior
versions: Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22778>
_______________________________________


More information about the New-bugs-announce mailing list