Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #76219

Re: Why does str not have a __radd__ method?

Date 2014-08-13 10:27 -0700
From Ethan Furman <ethan@stoneleaf.us>
Subject Re: Why does str not have a __radd__ method?
References <53eb8b8a$0$6574$c3e8da3$5496439d@news.astraweb.com>
Newsgroups comp.lang.python
Message-ID <mailman.12932.1407950830.18130.python-list@python.org> (permalink)

Show all headers | View raw


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.

--
~Ethan~

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Why does str not have a __radd__ method? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-14 02:00 +1000
  Re: Why does str not have a __radd__ method? Ethan Furman <ethan@stoneleaf.us> - 2014-08-13 10:27 -0700
    Re: Why does str not have a __radd__ method? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-14 03:55 +1000
      Re: Why does str not have a __radd__ method? Ethan Furman <ethan@stoneleaf.us> - 2014-08-13 11:22 -0700
      Re: Why does str not have a __radd__ method? Jason Swails <jason.swails@gmail.com> - 2014-08-13 14:36 -0400
        Re: Why does str not have a __radd__ method? wxjmfauth@gmail.com - 2014-08-13 23:24 -0700

csiph-web