I want to use a computation cache scheme like

        o = CACHECOMPUTE  complex-key-expr  expensive-calc-expr 


frequently and elegantly without writing complex-key-expr or 
expensive-calc-expr twice.
So its ugly:

        _=complex-key-expr; o=cache.get(_) or 
cache.setdefault(_,expensive-calc-expr)

Any ideas?

-robert

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to