New submission from Joe Jevnik:

The old error of tuple.index(x): x not in tuple seemed very confusing to me. It 
was also harder to quickly understand what the program was doing wrong. This 
saves people a second pass through the program under the debugger because they 
can just see what the invalid value was.

The reason I am explicitly calling repr instead of using %R is that I didn't 
want to call repr twice if I didn't need to. If people think that is fine the 
format can just be tuple.index(%R): %R not in tuple instead.

----------
messages: 294516
nosy: brett.cannon, llllllllll
priority: normal
pull_requests: 1906
severity: normal
status: open
title: tuple.index error message improvement
versions: Python 3.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30477>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to