David Eppstein <eppstein at ics.uci.edu> writes: > Let me be more specific. Since we have such useful hashing-based > dictionary data structures in Python, we don't often need cmp for > binary search trees, so the main reason for comparing unicodes (as far > as I can tell) is to put them in a logical order for displaying to > humans. cmp(unicode,unicode) does a very bad job of this, whenever > there are non-ascii characters involved. Its existence tricks you into > thinking Python has a useful unicode comparison function when it > doesn't. It's useful for sorting, but not for collation. Comparing!=Collating. That said, locale.strcoll does what you want. Regards, Martin
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4