Problem with sets and Unicode strings
Fredrik Lundh
fredrik at pythonware.com
Thu Jun 29 17:02:09 EDT 2006
Dennis Benzinger wrote:
>>> shadows the error of not setting sys.defaultencoding()?
>>
>> You can't set the default encoding. If you could, then scripts that run
>> on your machine wouldn't run on mine.
>> [...]
>
> As Serge Orlov wrote in one of his posts you _can_ set the default
> encoding (at least in site.py). See
> <http://docs.python.org/lib/module-sys.html>
yes, but you're not supposed to do that, for several reasons, including
the reasons Robert provided: if you mess with the interpreter defaults,
code you write isn't portable, and code written by others may not work
on your machine.
the interpreter isn't fully encoding agnostic either; things are not
guaranteed to work properly if you're not using the default.
</F>
More information about the Python-list
mailing list