Yoooooooooo !!

> Perhaps not the most elegant solution ;-), but I guess you could use an
> auxiliary cached function that throws its result instead of returning it
> in cases where you don't want to cache it...

Hmmm... Well, the only way I see to do that is :

def my_main_function_which_caches_nothing(n,cache_it=False):
    if cache_it:
        return auxiliary_function(n)
    [do your job]

@cached_function
def auxiliary_function(n):
    return my_main_function_which_caches_nothing(n,cache_it=False)

But yeah, the main function would call itself through an auxiliary
function.... Well, I would like to avoid that :-/

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