summaryrefslogtreecommitdiff
path: root/Lib/contextlib.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-01-08 09:55:31 +0000
committerAntoine Pitrou <solipsis@pitrou.net>2011-01-08 09:55:31 +0000
commitfc9e41c4e54e8b1aed6ec4b502b224d73ad91b99 (patch)
tree109e077618899de7834377ddb3d0c9cd885bac02 /Lib/contextlib.py
parent5af10059d544830433ab2fbcc44cce0fb067a316 (diff)
downloadcpython-fc9e41c4e54e8b1aed6ec4b502b224d73ad91b99.tar.gz
Issue #10859: Make `contextlib.GeneratorContextManager` officially
private by renaming it to `_GeneratorContextManager`.
Diffstat (limited to 'Lib/contextlib.py')
-rw-r--r--Lib/contextlib.py4
1 files changed, 2 insertions, 2 deletions
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