> > One problem with short examples is they mask the reason for the code to > be structured that way. > > Couldn't agree more (I don't think I've ever written a nested function outside a closure). I made the assumption that the OP wasn't asking about closures based on his code samples. In hindsight, should have likely asked for clarification first.
-- http://mail.python.org/mailman/listinfo/python-list