On Wed, Sep 28, 2016 at 7:19 AM, Terry Reedy <tjre...@udel.edu> wrote: > The value of the cell variable is writable from within the body of the > closure function if declared nonlocal, but not otherwise, and not from > without. The latter may be what Peng meant by 'change' and the blogger by > 'read-only'. >
Not from entirely without, but it's possible for two functions to share a cell. I don't know the mechanics of how nonlocal assignment works, but ultimately, it's updating the cell that both closures see, so it's going to affect the other function too. ChrisA -- https://mail.python.org/mailman/listinfo/python-list