Remco Gerlich wrote: > I can't think of a really good generalization, one that will work for > all depths. That's the sort of thing you use Lisp, combinators and lots > of coffee for. Perhaps later today. Some nice solutions here: http://groups.google.com/group/comp.lang.python/browse_thread/thread/9519c885a24a65ea/c9697fa73bb59709 Kent