Steven D'Aprano <st...@pearwood.info>: > Tail call behaviour is not undefined in Python. There is a strong > convention (followed by all implementations I know of) to follow the > reference implementation's (CPython) behaviour, which is not to > optimize tail calls. But even if an implementation chooses to not > follow that, it's not *undefined behaviour*. It's just > implementation-dependent behaviour.
But in Scheme, tail call elimination is mandatory and thus can be relied on. Unless that promise is made, you can't write code that depends on it. Marko -- https://mail.python.org/mailman/listinfo/python-list