Just add the following to the class definition and you should be good to go:
__rmul__ = __mul__
More Related Contents:
- a * a//b doesn't work properly in Python (// Operator)
- Python’s Logical Operator AND
- Overriding “+=” in Python? (__iadd__() method)
- How are Python in-place operator functions different than the standard operator functions?
- Python AND operator on two boolean lists – how?
- Overriding properties in python
- Chaining “is” operators
- Python Method overriding, does signature matter?
- Override the {…} notation so i get an OrderedDict() instead of a dict()?
- In Python, how do I indicate I’m overriding a method?
- How to override the slice functionality of list in its derived class
- What do >> and
- How do I override a Python import?
- Force child class to override parent’s methods
- finding the biggest sequence of repeating numbers in a list
- How do I put a variable’s value inside a string?
- How to check for valid email address? [duplicate]
- How can I selectively escape percent (%) in Python strings?
- How to extract an arbitrary line of values from a numpy array?
- How to install PyGame on Python 3.4?
- Send http request through specific network interface
- parsing XML file gets UnicodeEncodeError (ElementTree) / ValueError (lxml)
- Why python has limit for count of file handles?
- “freeze” some variables/scopes in tensorflow: stop_gradient vs passing variables to minimize
- Pylint, PyChecker or PyFlakes? [closed]
- How to get multiple dictionary values?
- How can I check if a string has a numeric value in it in Python? [duplicate]
- Can I dynamically convert an instance of one class to another?
- Why does a python descriptor __get__ method accept the owner class as an arg?
- Delete multiple files matching a pattern