diff options
author | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2010-10-15 09:40:35 +0000 |
---|---|---|
committer | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2010-10-15 09:40:35 +0000 |
commit | d8c36a4fa64072aeda8279b25c987a7f8a1a7f4a (patch) | |
tree | 5939180532e7d496632dc987cc93aa948d1a4574 /lib_pypy/_md5.py | |
parent | Fix ctypes tests (diff) | |
download | pypy-d8c36a4fa64072aeda8279b25c987a7f8a1a7f4a.tar.gz pypy-d8c36a4fa64072aeda8279b25c987a7f8a1a7f4a.tar.bz2 pypy-d8c36a4fa64072aeda8279b25c987a7f8a1a7f4a.zip |
Try to fix tests
Diffstat (limited to 'lib_pypy/_md5.py')
-rw-r--r-- | lib_pypy/_md5.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib_pypy/_md5.py b/lib_pypy/_md5.py index 4276f0a005..856ca0cb85 100644 --- a/lib_pypy/_md5.py +++ b/lib_pypy/_md5.py @@ -375,11 +375,14 @@ class MD5Type: digest_size = 16 -def md5(arg=None): - """Same as new(). - - For backward compatibility reasons, this is an alternative - name for the new() function. +def new(arg=None): + """Return a new md5 crypto object. + If arg is present, the method call update(arg) is made. """ - return new(arg) + crypto = MD5Type() + if arg: + crypto.update(arg) + + return crypto + |