melsophos/sympy — pull request #3 by Upabjojr (2013-04-12 13:46:23+00:00)
Title: Added context managers in UnitSystem

You can now use:

with mks:
...

instead of:

previous_us = _UNIT_SYSTEM
set_system(mks)
...
set_system(previous_us)