Hi --

On Sun, 23 Dec 2001, Ron Jeffries wrote:

> 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?

You could do:

   result = @@save[self] and return result


David

-- 
David Alan Black
home: dblack / candle.superlink.net
work: blackdav / shu.edu
Web:  http://pirate.shu.edu/~blackdav