On Tue, Jan 4, 2011 at 2:49 AM, Michael Foord <fuzzy...@voidspace.org.uk> wrote: > I think someone else pointed this out, but replacing builtins externally to > a module is actually common for testing. In particular replacing the open > function, but also other builtins, is often done temporarily to replace it > with a mock. It seems like this optimisation would break those tests.
Hm, I already suggested to make an exception for open, (and one should be added for __import__) but if this is done for other builtins that is indeed a problem. Can you point to example code doing this? -- --Guido van Rossum (python.org/~guido) _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com