Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Common way of adding context manager + release to classes #27

Open
trym-b opened this issue Nov 12, 2019 · 0 comments
Open

Common way of adding context manager + release to classes #27

trym-b opened this issue Nov 12, 2019 · 0 comments

Comments

@trym-b
Copy link
Contributor

trym-b commented Nov 12, 2019

__enter__, __exit__, __del__ and release are duplicated in many of the classes in modules/zivid

This could be fixed by adding, for example, and decorator:

@utils.context_manager
class SomethingThatRequiresContextManager:
    ....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant