Were I to make a language to compile to Python, it is highly likely I would need to use hidden variable names to work constructs that Python alone does not have. This is the situation I face.
If I were to use internal double-underscored names of the form __BS_* internalname*__, would the compiled code be able to assume that no-one had overwritten these variables and never will, even through modification of, say, locals(). I ask because Python's docs seem to specify that double sided double underscored names are strictly for Python and its special names. In other words, is not using __these_names__ in Python code rule or heavy convention. __BS__ is used because the name of the language is BluntSharp. Do not expect the language to ever be useful or widespread; I am doing this mostly for fun. An alternative is modifying the AST (as I am really compiling to Python's AST) to have the variables with names such as "+BS_internalname", but that seems like it might break a lot. I also doubt that it is good convention.
-- http://mail.python.org/mailman/listinfo/python-list