[issue16606] hashlib memory leak

Lukas Lueg report at bugs.python.org
Tue Dec 4 16:04:43 CET 2012


Lukas Lueg added the comment:

Thorsten, the problem is that you are using line-based syntax. The code 'for buffer in f:' will read one line per iteration and put it to 'buffer'; for a file opened in binary mode, the iterator will always seek to the next b'\n'. Depending on the content of the file, python may have to read tons of data before the next b'\n' appears.

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

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16606>
_______________________________________


More information about the Python-bugs-list mailing list