afarviral
Joined 7 years ago
Joined 7 years ago
Have you considered getting a second opinion on your meds? That sounds like a lot if that's 3 separate medications, and not without side effects which may be contributing to a lack of interest in interests.
I hope it takes off!
I noticed it's a bit slow after clicking the title of a thread, unlike HN which is a bit more instantaneous. It wouldn't be a problem but it's the main interaction so worth double checking/optimizing.
The README mentions 3 scenarios that this might be preferred over, but not the fourth which I regularly do: Create my own functions/classes that are composed from the unchanged modules. E.g. a request_with_retries function which adds retry logic to requests without the need to monkey patch. I regularly use decorators as well to add things like retries.
For more complex scenarios Modshim might win out, as mentioned in the understated section of the README "Benefits of this Approach":
> Internal Reference Rewriting: This example demonstrates modshim's most powerful feature. By replacing requests.sessions.Session, we automatically upgraded top-level functions like requests.get() because their internal references to Session are redirected to our new class.
> Preservation of the Original Module: The original requests package is not altered. Code in other parts of an application that imports requests directly will continue to use the original Session object without any retry logic, preventing unintended side-effects.
What I think this means is Modshim lets you really get in to the guts of a module (monkey-patch style, giving you god-like powers), while limiting the damage.