About a namespace discussion: @MichaelDiBernardo I don't know how to strike the balance between explanation in code, and explanation in the chapter text?

About the function name: having this function implicitly return the 'render' function is not nice, since the caller is the one who decided that the function is named render.  I've refactored it to return a dict of all the globals defined by the code, and the caller can retrieve whatever value she wants.