Issue #10859: Make contextlib.GeneratorContextManager officially

private by renaming it to `_GeneratorContextManager`.
This commit is contained in:
Antoine Pitrou 2011-01-08 09:55:31 +00:00
parent d97b7b5158
commit 67b212e608
3 changed files with 11 additions and 8 deletions

View file

@ -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