On Mon, Nov 25, 2013 at 9:37 PM, Ron Adam <ron3200@gmail.com> wrote:
It could be used within functions. Currently __name__ is masked by the
function's __name__ attribute if you try that.

That's news to me.  It was not so as of 3.3.3:

Python 3.3.3 (default, Nov 25 2013, 15:41:46)
>>> def f():
...     print(__name__)
...
>>> f()
__main__

If anything, it is a magic function relying on _getframe() run-time introspection that would have a problem working inside functions.