Small bit of background that may help explain part of the comment: I originally posted that code on devshed as what I considered to be a prettier way of writing an acc gen (and by extension any stateful closure). I misread Dietrich's reply as where would _I_ use an acc gen (answer "Never") - sorry, D. Glad someone liked it

.
Python is probably either getting an "outer" declaration or else the "global" declaration will look in successively outer scopes. Not sure if this will be 2.6 or 3.0 tho.
Cheers, -T.