> I was writing a little code that cached a function value, and wound up
> with this:
> 
> result = @@save[self]
> return result if result
 
> I don't see a way to do it in one line unless I'm willing to do the
> lookup twice. Am I missing something?

@@save.fetch(self){your funcdef}

you coluld also use "fetch"

/h


> Thanks!
> 
> Ronald E Jeffries
> http://www.XProgramming.com
> http://www.objectmentor.com