Another idea: We could replace the function globals() with an object that provides __call__ for backwards compatibility, but also has a special __setattr__. Then global assignment would be 'globals.x = 23'. Would this be possible?
Yes, I just proposed this in my previous response. :-)
--Guido van Rossum (home page: http://www.python.org/%7Eguido/)