Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 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.



To be fair, logging is badly made. There are at least two libs to make it human again.


Indeed 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.


Which ones do you suggest/recommend?


im a big fan of loguru.


@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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: