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

Random832 random832 at fastmail.com
Thu Nov 26 19:15:21 EST 2015


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.

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