On Thu, Nov 19, 2015 at 1:55 PM, fl <rxjw...@gmail.com> wrote: > There are only one time 5 'here' printed out, but there is no 'here' print > out in thereafter call sq[2]() etc. How to understand this phenomenon?
Code does what code should. Before you ask for comprehension of "this phenomenon", why don't you tell us what you expect your code to do, and why? I just asked my non-programmer sister and she was completely unsurprised by what Python did here. ChrisA -- https://mail.python.org/mailman/listinfo/python-list