Steven D'Aprano <ste...@remove.this.cybersource.com.au> writes:
> def rvisit(node):
>     print node
>     if node and node.link is not None:
>         rvisit(node.link)

Less redundant (remember the extra "recursion" doesn't cost anything
if the compiler is sane enough to turn it into a jump):

 def rvisit(node):
     print node
     if node:
         rvisit(node.link)
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to