-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't rely on method monkey patching
It is hard to reason about code when monkey patched and methods are overwritten. This had two methods/property: joined() and lines() calling each other, and depending on how the object was constructed one was replaced by an attribute. Is is convoluted and make static inference difficult. Move to private attribute and always storing `_lines` (as a list of strings that are not terminated by newlines.
- Loading branch information
Showing
1 changed file
with
10 additions
and
7 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