Hacker News new | ask | show | jobs
by orbisvicis 323 days ago
Hmm, that's what pdb.set_trace() uses, right? That means monkey-patching live code will have an unavoidable performance hit, with the exception pointed out by sibling @skeledrew comment.

Which brings me back to my long-held belief that python functions are not quite first-class, not until you can rip them apart and put them back together as if nothing ever happened.

Not to say there haven't been improvements, as evinced by the decorator module rewrite from version 2->3 (or 3->4; can't remember) that completely changed how the resulting function was constructed.