We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
with
In all examples involving “servers” there is a try ... finally block:
try ... finally
try: # some code finally: # Unregister the DBus service and objects. SESSION_BUS.disconnect()
I would suggest to natively support the PEP 343 with statement, in order to allow refactoring the above code as
with SESSION_BUS: # some code
The implementation using with-statement context managers should be straightforward.
The text was updated successfully, but these errors were encountered:
That makes sense. Thanks for the suggestion! The implementation is available at #115.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
In all examples involving “servers” there is a
try ... finally
block:I would suggest to natively support the PEP 343
with
statement, in order to allow refactoring the above code asThe implementation using
with
-statement context managers should be straightforward.The text was updated successfully, but these errors were encountered: