"Each module, class, function, lambda, or anonymous block of code
given to the exec command has its own private namespace."
Please consider whether or not it is appropriate for someone starting
to learn Python to be exposed to "anonymous block of code".
As a newbie to Python, the phrase "anonymous block of code" got my
attention and I wanted to find out what it meant. The word "anonymous"
was mentioned in only one other spot in your book (The Lambda)
I googled "Python anonymous block of code" and ran across the
following "Python has anonymous functions, but they're not allowed to
contain "statements," just an "expression." Hence, if you want Python
to use "custom logic," you need to create a function with a name (not
an anonymous function) and pass the name around. Why can't an
anonymous Python function contain statements? You'll have to ask
Guido. This has been hashed over ad nauseum in the Python world, and
it makes my eyes glaze over. "
At that point, I decided that it was an advanced topic that I would
come back to later.
Perhaps, your goal was to plant the seed in the students mind?
Either way, please consider blogging about the use of "anonymous block
of code". In my professional career in the Oracle database, I have
seen "anonymous block of code" severely abused which led to much
"what's is it doing?".