summaryrefslogtreecommitdiffstats
path: root/Doc/lib/sqlite3/md5func.py
diff options
context:
space:
mode:
authorCollin Winter <collinw@gmail.com>2007-08-07 01:20:21 (GMT)
committerCollin Winter <collinw@gmail.com>2007-08-07 01:20:21 (GMT)
commit45d569b8232d19b0f6bd1385e8fb624f310d230e (patch)
tree610eda1d0c574f81bed24f2ceceecb0abf2ca1e5 /Doc/lib/sqlite3/md5func.py
parentb942d28bf5b62e1823b91a7b3986e120ec9763bc (diff)
downloadcpython-45d569b8232d19b0f6bd1385e8fb624f310d230e.zip
cpython-45d569b8232d19b0f6bd1385e8fb624f310d230e.tar.gz
cpython-45d569b8232d19b0f6bd1385e8fb624f310d230e.tar.bz2
Run 2to3 over Doc/lib/sqlite3/.
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])