[Python-Dev] international python

Neil Hodgson nyamatongwe at gmail.com
Sat Sep 10 05:17:55 CEST 2005

Antoine Pitrou:

> I don't have a Windows machine at hand right now to test it, but, even
> if this solution works, it breaks the principle of least astonishment:

   Astonishment is subjective and so a poor tool to measure by. At one
stage Ruby tried to follow the more common formulation "principle of
least surprise" (POLS) but this produced arguments of the following

   I am surprised by X.
   Therefore, X contradicts POLS.
   Therefore, X must be fixed.

   POLS was then abandoned.

> os.path.abspath() should do the Right Thing regardless of what the
> current locale is.

   This was discussed recently and the consensus position was for
functions that can not return a value in the default encoding to
instead return a unicode value. Correct implementation of this would
require not only changing the behaviour of functions returning strings
but also those receiving strings (which should treat byte strings as
being in the default encoding). This would require a large amount of
work, and is unlikely to be performed in the near future.


More information about the Python-Dev mailing list