|
|
|
|
|
by ajitk
5132 days ago
|
|
On the contrary, wouldn't OP's solution be an example of more generalized implementation of multiplication? I can see that it is similar to (X * 2) where X defines behavior of __mul__. Yes, there is chance that arbitrary objects can provide different semantics for __mul__. It would be true for any language. |
|