B
Brian Quinlan
This is from Python built from the py3k branch:.... print(q())
....
11
12
13
14
15.... print(q())
....
15
15
15
15
15
Looking at the implementation, I see why this happens:.... print(id(q.__closure__[0]))
....
3847792
3847792
3847792
3847792
3847792
But it seems very odd to me and it can lead to some problems that are a
real pain in the ass to debug.
Cheers,
Brian
....
11
12
13
14
15.... print(q())
....
15
15
15
15
15
Looking at the implementation, I see why this happens:.... print(id(q.__closure__[0]))
....
3847792
3847792
3847792
3847792
3847792
But it seems very odd to me and it can lead to some problems that are a
real pain in the ass to debug.
Cheers,
Brian