On Sep 10, 2008, at 7:35 AM, Jason Grout wrote: > Justin Walker wrote: >> >> On Sep 9, 2008, at 7:25 PM, Jason Grout wrote: >>> Jason Merrill wrote: >>>> On Sep 9, 6:35 pm, Justin Walker <[EMAIL PROTECTED]> wrote: >>>>> Hi, all, >>>>> >>>> There may be a more pythonic way to do this--I'm just trying to >>>> translate something I saw in Ruby. I think I've seen at least one >>>> person define an @cache decorator somewhere on the web. >>> I believe we have such a decorator already in Sage, courtesy of >>> mhansen, >>> and of all people, the original poster :). >> >> OK, that's just mean. I have to go think about this some more. It's >> more work than I was planning on tackling at this point... >> >> But thanks for reminding me about the dangers of partaking of the >> Internet Experience. >> >> Justin > Sorry...I was really tired last night when I wrote this, so it may > have > come out meaner than I intended. The credits to the file say that the > original implementation was inspired by conversations with Justin, > which > may not be the same as Justin actually writing the code.
To clarify my remarks, I was not offended or bothered by your response. > Again, I think JM's approach has some advantages over the current > decorator in Sage, though, as the current decorator doesn't replace > the > function if it is a constant function; instead, it looks up the > arguments (None, None) every single time. Maybe it would be nice to > have a special case in the cached decorator or another > @cachedconstantfunc or something. I am the 'Justin' referred to. I just forgot that discussion. Justin (him) -- Justin C. Walker, Curmudgeon-at-Large () The ASCII Ribbon Campaign /\ Help Cure HTML Email --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---