On Wednesday, July 15, 2015 at 2:44:55 AM UTC-4, Marko Rauhamaa wrote: > Gregory Ewing <greg.ew...@canterbury.ac.nz>: > > > Marko Rauhamaa wrote: > > >> It might even be tail-call optimized by Python. Only you can't count > >> on it because the language spec doesn't guarantee it. > > > > The language spec might permit it, but the BDFL has explicitly > > expressed a dislike for the idea of implicit tail call removal, so > > it's unlikely to ever happen in CPython. > > Permitting wouldn't be enough. > > The other problem for tail call elimination is the requirement that > functions return None by default. Smooth tail call elimination would > require that Python leave the default return value unspecified.
I don't understand this, can you explain more? Are you saying that the Python specification shouldn't specify what x becomes?: def who_knows(): pass x = who_knows() --Ned. -- https://mail.python.org/mailman/listinfo/python-list