Message376539
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>
> _______________________________________
> |
|
Date |
User |
Action |
Args |
2020-09-07 23:27:44 | Phillip.M.Feldman@gmail.com | set | recipients:
+ Phillip.M.Feldman@gmail.com, steven.daprano, mpaolini |
2020-09-07 23:27:44 | Phillip.M.Feldman@gmail.com | link | issue41740 messages |
2020-09-07 23:27:44 | Phillip.M.Feldman@gmail.com | create | |
|