Steven D'Aprano <steve+pyt...@pearwood.info> added the comment:
Marco, sum should be as fast as possible, so we don't want to type check every single element. But if it is easy enough, it might be worth checking the first element, and if it fails, report: cannot add 'type' to start value where 'type' is the type of the first element. If that is str, then concatenate (use ''.join(iterable) instead) to the error message. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41740> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com