Peng Yu <pengyu...@gmail.com> writes:
> Hi, In many other functional language, one can change the closure of a
> function. Is it possible in python?

I do not think so: the corresponding attributes/types ("__closure__", "cell")
are explicitely designed to be read only.

However, I never missed closure changebility. Should I really need it
(in an extreme rare case), I would bind the corresponding variable
to an object which could be modified at will.

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to