Sworddragon added the comment:

> This idea was already proposed in issue #8622, but it was a big fail.

Not completely: If your locale is utf-8 and you want to operate on an utf-8 
filesystem all is fine. But what if you want then to operate on a ntfs 
(non-utf-8) partition? As I know there is no way to apply Python-environment 
variables on the fly with an effect to the interpreter. In my opinion this is 
the reason why a setter is needed here.

Otherwise the user has to go sure to use .encode() on all filesystem 
operations. Also he must ensure that .encode() doesn't throw any exception if 
the code must be robust. And with issue http://bugs.python.org/issue19846 this 
must likely be done with the content too. This will be really a hell in 
increasing the number of lines due to exception checking.

Is there a special reason that is against such a setter? The current advantage 
would be a huge increasing in maintainability of Python scripts who are relying 
on a high stability.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19847>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to