Skip to content

Comment on Show HN: Python decorator to log local variables with each line of code runparent

Comments

same thoughts. i kind of get the utility of logging the whole application state without breakpoints or stepping through stuff (but maybe debuggers can also do this?), but my first thought was that this is simpler for folks not used to debuggers

It is not unusual for me to have a for-loop running for a few hours as it is processing thousands of small objects or just a few dozen of large ones. A debugger wouldn't necessarily help me in this case and this decorator would be a little easier to set up than a logger.

ah, yeah, i can see it being useful here.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.