> This is a specific case of the * operator, which is overloaded
It is not operator overloading in the strictest sense, but more of duck typing. In Python (and Ruby), operators are syntactic sugar for method calls on the first operand.
Operator overloading on the contrary suggests a function add(a, b) that reacts differently through polymorphism (i.e according to the types of its arguments).
The distinction is important as overloading and polymorphism simply do not exist in Ruby and Python, only overriding.
Re:Display 100 Hello World Without Using Loops
by hythloday on Friday May 25, 2012 @09:44AM
(#4023402)
My hope in using the phrase "operator overloading" was to bring to mind the familiar concept of operator ad-hoc polymorphism (which I would maintain duck typing is an example of) rather than to misleadingly describe the internals of the Python language. Nonetheless you are quite right on the details.
How do you know the __mul__ operator overload for string is implemented with iteration?