pydata/pandas — pull request #5625 by jtratner (2013-12-01 00:50:30+00:00)
Title: ENH: Make set_option into a contextmanager that undos itself on __exit__

Fixes #5618

cc @y-p and @jseabold

I went ahead and simplifed all the prefixing stuff to just change a
single `prefix_key` function instead and handled the dynamic docstring
by setting the `__doc__` attribute of functions/classes. set_option is
now callable *and* a contextmanager (whee!) so no need to add anything
else to the global namespace (if you don't call __exit__ it doesn't undo
itself)