A new module for performing tail-call elimination

Chris Angelico rosuav at gmail.com
Fri Jul 17 20:47:30 EDT 2015


On Sat, Jul 18, 2015 at 10:40 AM, Terry Reedy <tjreedy at udel.edu> wrote:
> If children are not always instances of type(self), as when a tree has
> separate Node and Leaf classes, then recursive calls to Node instances must
> be separated from non-recursive Leaf calls before replacing the recursive
> calls.

More serious concern: If it's possible for one of the children to be
an arbitrary subclass of that type, it could have overridden the
setvalue method. To maintain the expectations, you absolutely have to
do the full lookup and pass the message down the chain.

ChrisA



More information about the Python-list mailing list