New submission from Jean-Paul Calderone <exar...@divmod.com>: It used to be possible to use hashlib with arrays; it no longer seems possible.
exar...@charm:~$ python -c ' import sys, hashlib, array print sys.version_info print hashlib.sha1(array.array("b", [1, 2, 3])).hexdigest() ' (2, 5, 2, 'final', 0) 7037807198c22a7d2b0807371d763779a84fdfcf exar...@charm:~$ ~/Projects/python/trunk/python -c ' import sys, hashlib, array print sys.version_info print hashlib.sha1(array.array("b", [1, 2, 3])).hexdigest() ' sys.version_info(major=2, minor=7, micro=0, releaselevel='alpha', serial=0) Traceback (most recent call last): File "<string>", line 4, in <module> TypeError: object supporting the buffer API required exar...@charm:~$ ---------- components: Library (Lib) messages: 88122 nosy: exarkun severity: normal status: open title: no longer possible to hash arrays type: behavior versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6071> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com