class S(object): def __radd__(self, other): return 'abc' class O(str, S): pass a = O() print ' ' + a