git » pymisc » master » tree

[master] / samples / lazy / sample2.py

1
2
3
4
5
6
7
8
9
import lazy


@lazy.lazy
def f(x):
	return x

r = f(x)	# r has a "lazy object"
print r		# f is run here