I've talked a little about names and objects in my lectures, and started thinking about how to show what objects are created during execution of a program.
gc module has a function called
get_objects() which returns "a list of objects tracked by the [garbage] collector", which is an excellent start.
Wouldn't it be quite possible to use these tools to draw a visual diagram (graphviz, anyone?) of the relevant names, objects, and references? I wonder...