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 <rep...@bugs.python.org>
<http://bugs.python.org/issue22778>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to