This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Phillip.M.Feldman@gmail.com
Recipients Phillip.M.Feldman@gmail.com, mpaolini, steven.daprano
Date 2020-09-07.23:27:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAB2ViTacJmj+X_HuY4C-CHFNR6CBFXqs4yDjEQ+HxKhySB5oxQ@mail.gmail.com>
In-reply-to <1599517485.04.0.960018845499.issue41740@roundup.psfhosted.org>
Content
I'd forgotten about ''.join; this is a good solution.  I withdraw my
comment.

On Mon, Sep 7, 2020 at 3:25 PM Steven D'Aprano <report@bugs.python.org>
wrote:

>
> Steven D'Aprano <steve+python@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 <report@bugs.python.org>
> <https://bugs.python.org/issue41740>
> _______________________________________
>
History
Date User Action Args
2020-09-07 23:27:44Phillip.M.Feldman@gmail.comsetrecipients: + Phillip.M.Feldman@gmail.com, steven.daprano, mpaolini
2020-09-07 23:27:44Phillip.M.Feldman@gmail.comlinkissue41740 messages
2020-09-07 23:27:44Phillip.M.Feldman@gmail.comcreate