From 67b212e608044b094272248200db71af69518df9 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Sat, 8 Jan 2011 09:55:31 +0000 Subject: Issue #10859: Make `contextlib.GeneratorContextManager` officially private by renaming it to `_GeneratorContextManager`. --- Lib/contextlib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Lib/contextlib.py') diff --git a/Lib/contextlib.py b/Lib/contextlib.py index e37fde8a02..4633cff7a4 100644 --- a/Lib/contextlib.py +++ b/Lib/contextlib.py @@ -17,7 +17,7 @@ class ContextDecorator(object): return inner -class GeneratorContextManager(ContextDecorator): +class _GeneratorContextManager(ContextDecorator): """Helper for @contextmanager decorator.""" def __init__(self, gen): @@ -92,7 +92,7 @@ def contextmanager(func): """ @wraps(func) def helper(*args, **kwds): - return GeneratorContextManager(func(*args, **kwds)) + return _GeneratorContextManager(func(*args, **kwds)) return helper -- cgit v1.2.1