On Fri, 21 Mar 2008 14:51:49 -0700 (PDT)
Gabriel Genellina <[EMAIL PROTECTED]> wrote:

> > If I fill the array with 0 instead of the functions that
> > return "" this works really fast.
> >
> > However, I would like to be able call the content of each
> > cell in the array as a function.
> 
> If you drop this condition then you could fill the array with zeroes
> as before, replace only the interesting ones with actual functions,
> and write:
> 
> for item in myarray[nonzero(myarray)]:
>     print item() if callable(item) else item

Works for me.

Thank you

Martin
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to