On Sat, May 2, 2015 at 5:42 AM, Marko Rauhamaa <[email protected]> wrote: > Christian Gollwitzer <[email protected]>: > >> That's why I still think it is a microoptimization, which helps only >> in some specific cases. > > It isn't done for performance. It's done to avoid a stack overflow > exception.
If your tree is balanced, then the number of items you would need to have to get a stack overflow exception would be approximately 2 ** 1000, which you can't possibly hope to fit into memory. If your tree is unbalanced and you're getting a stack overflow exception, then maybe you should think about balancing it. -- https://mail.python.org/mailman/listinfo/python-list
