Suppose I have the following dict d={'a': heavy_expression1, 'b': heavy_expression2}.
How can I wrap the expressions, so that they are evaluated once they are accessed and after this no evaluation is performed?
d['a'] # only here heavy_expression1 is executed
d['a'] # no execution here, already calculated
Do I need to use lambda or generators?