Python 2.x で部分的にソートされたタプルがあります。
なぜ Python はそれを並べ替えるのではなく逆にするのですか?
>>> data = (u'a', (1,), 'b ', u'b', (2,), 'c ', u'c', (3,), 'd ', u'd', (4,), 'e')
>>> sorted(data) == list(reversed(data))
True
Python3が待ち遠しいです。
Python 2.x で部分的にソートされたタプルがあります。
なぜ Python はそれを並べ替えるのではなく逆にするのですか?
>>> data = (u'a', (1,), 'b ', u'b', (2,), 'c ', u'c', (3,), 'd ', u'd', (4,), 'e')
>>> sorted(data) == list(reversed(data))
True
Python3が待ち遠しいです。