On 12/07/14 10:28, Steven D'Aprano wrote:
If you're using Python 3.3 or higher, it is better to use
message.casefold rather than lower. For English, there's no real
difference:
...
but it can make a difference for non-English languages:
py> "Große".lower() # German for "great" or "large"
'große'
py> "Große".casefold()
'grosse'
You learn something new etc...
But I'm trying to figure out what difference this makes in
practice?
If you were targeting a German audience wouldn't you just test
against the German alphabet? After all you still have to expect 'grosse'
which isn't English, so if you know to expect grosse
why not just test against große instead?
I think I'm missing something.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.flickr.com/photos/alangauldphotos
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor