What is a cell in the context of an interpreter or compiler?
问题 Python code objects have an attribute co_cellvars. The documentation to PyPy's bytecode interpreter often uses the term Cell . Among other langauges, Rust provides a Cell datatype. Googling suggests they relate to closures somehow. What is a cell , in the context of a programming language implementation? What problem do cells solve? 回答1: In Python, cell objects are used to store the free variables of a closure. Let's say you want a function that always returns a particular fraction of its