Skip to content

Fix the signature of decorator.contextmanager#3330

Merged
srittau merged 3 commits intopython:masterfrom
JukkaL:fix-decorator
Oct 9, 2019
Merged

Fix the signature of decorator.contextmanager#3330
srittau merged 3 commits intopython:masterfrom
JukkaL:fix-decorator

Conversation

@JukkaL
Copy link
Contributor

@JukkaL JukkaL commented Oct 9, 2019

It must return a context manager, similar to contextlib.contextmanager.

It must return a context manager, similar to `contextlib.contextmanager`.
Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, although we could use the custom ContextManger defined here, as it will always add the __call__() method. We should probably keep ContextManager generic, tough.

@srittau srittau merged commit 0914d50 into python:master Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants