4 ms·
> while software engineers would be terrified At least surprised. There are solutions to these problems already. Author seemed to have learned decorators and
by rmbyrro 4y ago
> while software engineers would be terrified
At least surprised. There are solutions to these problems already.
Author seemed to have learned decorators and is enthusiastic about abusing them, instead of learning the stdlib.
The capturing of print statements. Why not use the Logging machinery, instead?
Or the @stacktrace, it seems what they really want/need is a debugger.
But anyway, if these solutions fit their programming style better, so be it.
- agumonkey 4y agoTo be fair, logging is badly made. There are at least two libs to make it human again.
- rmbyrro 4y agoIndeed fair. But even if I preferred the decorator style, I'd be cautious about dropping a stdlib or any other mature solution. When I create my own solutions, I tend to underestimate how hard it will be to get it working bug-free and to maintain it.
- anu7df 4y agoWhich ones do you suggest/recommend?
- imcoconut 4y agoim a big fan of loguru.
- mattkrause 4y ago@redirect could be handy when the print statements are embedded in someone else's code. We use a library that is very...chatty (some function calls send a screenful of info/progress to the screen), and I think I'm going to steal this to make it quieter.