[issue41242] When concating strings, I think it is better to use += than join the list

Serhiy Storchaka report at bugs.python.org
Wed Jul 8 13:05:41 EDT 2020


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

In this particular case the number of concatenations is limited, the resulting string is usually short, and the code is not performance critical (it is the __repr__ implementation). So there is no significant advantage of one way over other, and no way is obviously wrong. In such cases the status quo wins.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41242>
_______________________________________


More information about the Python-bugs-list mailing list