That example is cool!  But I tested this and didn't hit the UnboundLocalError -- was that using 2.6 or something?