On Thu, Aug 6, 2015 at 1:37 AM,  <jennyfurta...@gmail.com> wrote:
> Sorry I am missing a subtle point: Isnt 1+ self.soldiersVsDefenders... ending 
> up calling 1.__add__(self.soldiersVsDefenders...)?

I think his point is that it is, in effect, doing that; but honestly,
calling this a tail call into the int+int addition function is pretty
pointless. I mean, sure, it's technically a sort of tail call, but
it's definitely not tail recursion, and it's such a trivial operation
(adding one to a probably-small number) that it's hardly even worth
mentioning. The main point of tail recursion is how it interacts with
the self-call, and that's not the tail call here.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to