diff options
Diffstat (limited to 'Lib/decimal.py')
-rw-r--r-- | Lib/decimal.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/decimal.py b/Lib/decimal.py index 2f989a8524..2e0afffd07 100644 --- a/Lib/decimal.py +++ b/Lib/decimal.py @@ -2173,7 +2173,7 @@ for name in rounding_functions: del name, val, globalname, rounding_functions -class WithStatementContext(object): +class ContextManager(object): """Helper class to simplify Context management. Sample usage: @@ -2248,8 +2248,8 @@ class Context(object): s.append('traps=[' + ', '.join([t.__name__ for t, v in self.traps.items() if v]) + ']') return ', '.join(s) + ')' - def context_manager(self): - return WithStatementContext(self.copy()) + def get_manager(self): + return ContextManager(self.copy()) def clear_flags(self): """Reset all flags to zero""" |