4 ms·
It's not great though. I do use it to repeat strings but it should have been a method and not weirdly overloading *. This type of misuse of operator overloading
by boxed 3y ago
It's not great though. I do use it to repeat strings but it should have been a method and not weirdly overloading *. This type of misuse of operator overloading is why people from a C++ background think operator overloading is evil. In python it's mostly ok, due to a more restrained culture, but this is a good example of when it's bad.
- maweki 3y agoIt's not weirdly overloaded. 'a'*3 == 'a'+'a'+'a'