
On Thu, Oct 17, 2019 at 01:42:54PM +0200, Anders Hovmöller wrote:
The multiply a list/string thing is a big mistake imo. You almost never use it so the cost of not having it is almost nothing while the cost of having type errors propagate beyond the point where they happened is big.
I use string repetition and concatenation frequently. For example, for indenting a string I much prefer this: string = " "*n + string over something like string = ''.join([''.join(' ' for __ in range(n)), string]) List repetition, not so often, but I do use list concatenation and even more so tuple concatenation. So I disagree that they are "almost never" used, or that they are a mistake. If we didn't have string `+` and `*`, and list `+`, I would certainly have to roll my own as functions. -- Steven