|
|
|
|
|
by lloeki
5137 days ago
|
|
> 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. |
|