Self function

Carl Banks pavlovevidence at
Tue May 5 00:51:15 CEST 2009

On May 4, 1:25 pm, bearophileH... at wrote:
> Aahz:
> > When have you ever had a binary tree a thousand levels deep?
> Yesterday.
> >Consider how big 2**1000 is...<
> You are thinking just about complete binary trees.
> But consider that a topology like a single linked list (every node has
> 1 child, and they are chained) is a true binary tree still.

1. Singly-linked lists can and should be handled with iteration.  All
recursion does it make what you're doing a lot less readable for
almost all programmers.

2. You should be using a Python list anyway.

Carl Banks

More information about the Python-list mailing list