[Python-Dev] deleting setdefaultencoding iin site.py is evil
Guido van Rossum
guido at python.org
Tue Aug 25 20:29:37 CEST 2009
On Tue, Aug 25, 2009 at 11:10 AM, Robert Kern<robert.kern at gmail.com> wrote:
> On 2009-08-25 12:37 PM, Guido van Rossum wrote:
>> In retrospect, it should have been called sys._setdefaultencoding().
>> That sends an extra signal that it's not meant for general use.
> Considering all of the sys._getframe() hacks out there, I suspect that this
> would encourage more abuse of the function than the current situation.
Why? It would still be deleted by site.py. The abuse of
sys._getframe() exists because it fills a real need. (As does abuse of
sys.setdefaultencoding(). However abusing it is actually more
troublesome, because the problems are much less theoretical.)
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev