On Sat, Jan 9, 2016 at 3:07 AM, Steven D'Aprano <st...@pearwood.info> wrote: > If you absolutely insist that you must must must continue to use a double > underscore name, you could also try this: > > py> __a = 1 > py> class Test: > ... def method(self): > ... x = eval("__a") > ... print(x) > ... > py> Test().method() > 1 > > > But don't do that.
Seriously? You consider that less bad than globals()["__a"]? But all of this is craziness to support craziness. It's not asking which inmate should run the asylum - it's asking which of my multiple personalities should be elected fourteen-year-old queen. ChrisA -- https://mail.python.org/mailman/listinfo/python-list