-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented context manager for socket data parsing
Using a `contextmanger` from Python’s native `contextlib` library allows to simplify code: socket error handling is abstracted away in the manager definition along with JSON parsing from the socket response. This makes the code more readable, cutting down on repetitive code.
- Loading branch information
1 parent
6816094
commit 084de82
Showing
1 changed file
with
38 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters