Lukas Lueg <knabberknusperh...@yahoo.de> added the comment:

This is true for all objects whose input could be concatenated.

For example with hashlib:

data = ['foobar']*100000
mdX = hashlib.sha1()
for d in data:
    mdX.update(d)
mdY = hashlib.sha1()
mdY.update("".join(data))

mdX.digest() == mdY.digest()

the second version is multiple times faster...

----------
nosy: +ebfe

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue1501108>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to