1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
import lazy import time def show(v): print 'show() init + print' s = str(v) print 'show() v: ' + s print 'show() done' @lazy.lazy def set(): print 'set() returns 3' return 3 v = set() show(v)