I am hoping the following would produce a list of 3 constant functions taking values 0, 1 and 2:

```
lis = []
for i in range(3):
    lis.append( lambda: i )

```

But they all end up taking value 2. I would expect deep copying to fix the problem but it doesn't seem to work.