Ryan, Thank you very much - your example is exactly the technique I was looking for.
My use case is unusual and we don't need to update the parent's version of locals(). The code in question is an internal template library whose methods need access to their caller's locals() so they can figure out how to expand variable references in string expressions. Eventually this library will be replaced with a more conventional template package; however, for the moment, I'm just keeping what we currently have working smoothly :) Cheers, Malcolm -- http://mail.python.org/mailman/listinfo/python-list