Also, it's not clear on what basis you make this assertion:
> FWIW, re-replaying the stack trace to figure out what was imported and re-implementing it is a horrible idea.
Does it not work?
Also, it's not clear on what basis you make this assertion:
> FWIW, re-replaying the stack trace to figure out what was imported and re-implementing it is a horrible idea.
Does it not work?
Line 17 of PEP-20 sums up my thoughts on this code as more than an intellectual exercise.
> If the implementation is hard to explain, it's a bad idea.
Regarding using Python as a replacement for shell scripting: if you have to rewire the language to do what you want, why are you using a different tool for the job?
I don't think this principle is universal in software, and I don't think you need to embrace it as a prerequisite for writing or distributing Python code. My personal preference would be for a statement more like this, "If the implementation is more complicated than it needs to be to do what you want, it's probably a bad idea."
> Regarding using Python as a replacement for shell scripting: if you have to rewire the language to do what you want, why are you using a different tool for the job?
Well that's easy to answer. It's cleaner and more readable than bash, has some nice features that shell scripts lack, can be used to call into python libraries, allows a single unified codebase if you're already writing python code . . . I could go on.