Gregory Ewing wrote:
+-------------+ +---+ | | a | --+---------------->| | +---+ | | +-------------+ ^ +---+ | b | --+-----------------------| +---+ In this model, a "reference" is an arrow. Manipulating references consists of rubbing out the arrows and redrawing them differently.
Greg, this is an excellent model, thank you for taking the time to put it together for the list... very helpful.
Both Summerfield and Lutz use the same model (and almost the identical graphic symbolism) to explain dynamic typing in Python. Summerfield's Programming in Python 3 2nd ed. has a good explanation similar, see pages 17 and 32 (there are others). Lutz has an entire chapter devoted to the topic in Learning Python 4th ed., see chapter six. He calls it the Dynamic Typing Interlude.
The model is in-the-field and very workable; and yet, it does have limitations, as most models do. For visual thinkers this model probably comes closest to being most helpful, esp in the beginning.
kind regards, m harris -- http://mail.python.org/mailman/listinfo/python-list