[Python-ideas] Python hook just before NameError

Skip Montanaro skip.montanaro at gmail.com
Mon Dec 29 02:06:59 CET 2014


On Sun, Dec 28, 2014 at 6:37 PM, Steven D'Aprano <steve at pearwood.info> wrote:
> If I've understood it correctly, it's also process-wide global, rather
> than limited to a single module. That makes it much less useful, as it
> risks disguising bugs in library code.

Though if you are using interactive mode to test library code, you
might have bigger problems on your hands than implicit imports...

This topic came up in a completely unrelated thread in c.l.py wherein
I apologized for an automatic import of the csv module in some
interactive copy-n-paste. Chris asked about it, and I posted the
module I use (which I don't think was original with me) as a
convenience in interactive mode. Then he looked into things and came
up with this patch.

S


More information about the Python-ideas mailing list