> Or, if your code contains the is_prime_power() logic, just assign the
> appropriate function (cached/non-cached) to some variable f and
subsequently
> call f() instead of a().

I don't follow you....

Let us say that I have a very complicated function a(), which builds
things, and that at some (late) level in the computation actually knows if
it CAN build it or not.

I would like to cache true/false answers because it is cheap to save, but
the complete result is too much to save. On the other hand, I don't want to
split the function into two, because it would mean copy/pasting the first
part of the function.

Nathann

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to