Ethan Furman wrote: > On 08/13/2014 09:00 AM, Steven D'Aprano wrote: >> >> What is the rationale for str not having __radd__ method? > > At a guess I would say because string only knows how to add itself to > other strings, so __add__ is sufficient.
# Python 2.7 py> "Hello" + u"World" u'HelloWorld' py> unicode.__radd__ Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: type object 'unicode' has no attribute '__radd__' My brain hurts. -- Steven -- https://mail.python.org/mailman/listinfo/python-list