timing puzzle

Neil Cerutti horpner at yahoo.com
Fri Nov 16 20:20:30 CET 2007


On 2007-11-16, Neil Cerutti <horpner at yahoo.com> wrote:
> Instead, filter your list. It looks like you can't use filter
> directly, so just do it manually.
>
>    for i in xrange(m):
>        .......
>        saved_nodes = []
>        for A in active_nodes[:]:

I meant to remove the slice. That line should be:

  for A in active_nodes:

>           ......
>           if not cond:
>               saved_nodes.append(A)
>
>           ......
>        active_nodes = saved_nodes
>        .....

-- 
Neil Cerutti



More information about the Python-list mailing list