Skip to content

Commit

Permalink
Update PRETTY_GOOD_PRACTICES.md (Chia-Network#13763)
Browse files Browse the repository at this point in the history
  • Loading branch information
RightSexyOrc authored Oct 31, 2022
1 parent 008ef2a commit 712bf45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PRETTY_GOOD_PRACTICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ This is useful for many forms of resource management and cleanup.
- Deleting temporary files that are created
- etc

One comon use of a context manager is to encapsulate a `try:` block in a reusable form.
One common use of a context manager is to encapsulate a `try:` block in a reusable form.
The underlying dunder (double underscore) methods for a context manager are `.__enter__()` and `.__exit__()`.
Usually it is more natural to use `@contextlib.contextmanager` to create a context manager from a generator function.
Async context managers can be similarly created for use with the `async with` statement.
Expand Down

0 comments on commit 712bf45

Please sign in to comment.