summaryrefslogtreecommitdiffstats
path: root/Doc/lib/sqlite3/md5func.py
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/lib/sqlite3/md5func.py')
-rw-r--r--Doc/lib/sqlite3/md5func.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/lib/sqlite3/md5func.py b/Doc/lib/sqlite3/md5func.py
index 5769687..b7bc05b 100644
--- a/Doc/lib/sqlite3/md5func.py
+++ b/Doc/lib/sqlite3/md5func.py
@@ -1,11 +1,11 @@
import sqlite3
-import md5
+import hashlib
def md5sum(t):
- return md5.md5(t).hexdigest()
+ return hashlib.md5(t).hexdigest()
con = sqlite3.connect(":memory:")
con.create_function("md5", 1, md5sum)
cur = con.cursor()
cur.execute("select md5(?)", ("foo",))
-print cur.fetchone()[0]
+print(cur.fetchone()[0])