[Python-Dev] deleting setdefaultencoding iin site.py is evil
"Martin v. Löwis"
martin at v.loewis.de
Thu Aug 27 10:06:40 CEST 2009
> if hasattr(sys, "setdefaultencoding"):
> + sys._setdefaultencoding = sys.setdefaultencoding
> del sys.setdefaultencoding
Ah, so you didn't want to rename the function. I agree that this
would not break backwards compatibility.
I guess the basic objection remains: making it so would make
_setdefaultencoding a supported feature, which would then mean
that we should fix all the bugs that it causes - when we already
know (because we thought many years about this) that it is not
possible to implement setdefaultencoding correctly and efficiently
(so the current implementation is only efficient, but not correct).
More information about the Python-Dev