mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
Issue #1717: documentation fixes related to the cmp removal.
This commit is contained in:
parent
c008a176af
commit
c48d834026
6 changed files with 45 additions and 36 deletions
|
|
@ -1,7 +1,12 @@
|
|||
import sqlite3
|
||||
|
||||
def collate_reverse(string1, string2):
|
||||
return -cmp(string1, string2)
|
||||
if string1 == string2:
|
||||
return 0
|
||||
elif string1 < string2:
|
||||
return 1
|
||||
else:
|
||||
return -1
|
||||
|
||||
con = sqlite3.connect(":memory:")
|
||||
con.create_collation("reverse", collate_reverse)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue