Late-binding of function defaults (was Re: What is a function parameter =[] for?)

MRAB python at mrabarnett.plus.com
Thu Nov 26 20:15:00 EST 2015


On 2015-11-27 00:15, Random832 wrote:
> Chris Angelico <rosuav at gmail.com> writes:
>> Windows: I'm not sure, and frankly, I don't trust it. A quick test
>> showed a couple of failures:
>>
>> It might be case insensitive only for ASCII.
>
> Windows uses a simple WCHAR->WCHAR (lower->upper) mapping for case
> comparison. it doesn't handle those cases, but it does handle all BMP
> characters that have a simple case equivalent within the BMP as of the
> unicode version that Microsoft supported when the disk was formatted.
>
Interesting, on Windows 10, "dir" on the command line treats
"TEßTING.txt" and "teßting.txt" as equivalent, whereas a file dialog
treats "TEßTING.txt", "teßting.txt" and "TESSTING.txt" as equivalent.

They don't treat "ParıldıYOR.txt" and "PARILDIYOR.txt" as equivalent,
which doesn't surprise me.

> It's unfair to pick the two worst examples that you know offhand and
> declare that this means "only for ASCII". Pick any latin-1 (etc)
> diacritic, any letter of the greek and cyrillic alphabet, and it'll
> handle them just fine.
>
> OSX fails the same cases, incidentally.
>




More information about the Python-list mailing list