Marco Paolini <[email protected]> added the comment:
also worth noting, the start argument is type checked instead. Maybe we could
apply the same checks to the items of the iterable?
python3 -c "print(sum(('a', 'b', 'c'), start='d'))"
Traceback (most recent call last):
File "<string>", line 1, in <module>
TypeError: sum() can't sum strings [use ''.join(seq) instead]
see
https://github.com/python/cpython/blob/c96d00e88ead8f99bb6aa1357928ac4545d9287c/Python/bltinmodule.c#L2310
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue41740>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com