On Wed, Mar 30, 2011 at 6:48 AM, Ian Kelly <ian.g.ke...@gmail.com> wrote: > Not to mention that it still has bugs: > > "" < "\0" > "\xff" < "\xff\xff"
That's because \0 isn't less than any character, nor is \xff greater than any. However, the latter is true if (for instance) your string is in UTF-8; it may be possible to use some construct that suits your own data. ChrisA -- http://mail.python.org/mailman/listinfo/python-list