Hellooooo ! > No, it does fix your caching problem. You can either cache the individual > work_for_case_x or the is_constructible function. > > Just to be perfectly clear, the _select_case function does not perform any > work! It only selects the function which would do the work if you were to > call it. But since the function is returned unevaluated, no work is actually > done. Only orthogonal_array evaluates, is_constructible does not evaluate.
You mean this ? def actual_construction(n): stuff @cached_function def is_construction_possible(n): if whatever: return actual_construction #just the function return False Two functions for each construction, two docstring, two sets of doctests, AND a function that returns either "False" or a 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.