cell object dereferencing

Terry Reedy tjreedy at udel.edu
Wed Dec 10 15:47:34 EST 2003


"Jan Decaluwe" <jan at jandecaluwe.com> wrote in message
 >(Next thing I would like to understand is how the hell you came up with
this!)

I can't speak for Pedroni, but...
If you start with the two facts I initially stated -- cells are externally
accessible as .func_closure tuple members but their values are only
internally accessible -- and treat them as design guidelines (as Pedroni
did) rather than as deniers of possibility (my mistake), one is pretty much
lead to the conclusion that you need to attach the cells to a function that
reads and returns the value.  This is Pedroni's template function.  The
third fact -- that .func_closure is read-only, dictates the near-copy via
new instead of simple reuse of the template.

Terry







More information about the Python-list mailing list