Mercurial > cpython-lru_cache-weakref
diff Lib/test/test_normalization.py @ 26392:482ae055bbd4 legacy-trunk
Reduced memory burden by iterating over the normalization test input
file directly (instead of sucking it all into a list of lines first).
| author | Tim Peters <tim.peters@gmail.com> |
|---|---|
| date | Sun, 24 Nov 2002 19:19:09 +0000 |
| parents | d207d1d78c5d |
| children | 31cbd46f0c7d |
line wrap: on
line diff
--- a/Lib/test/test_normalization.py Sun Nov 24 18:53:11 2002 +0000 +++ b/Lib/test/test_normalization.py Sun Nov 24 19:19:09 2002 +0000 @@ -33,10 +33,8 @@ raise TestSkipped(TESTDATAFILE + " not found, download from " + "http://www.unicode.org/Public/UNIDATA/" + TESTDATAFILE) - data = open(TESTDATAFILE).readlines() - part1_data = {} - for line in data: + for line in open(TESTDATAFILE): if '#' in line: line = line.split('#')[0] line = line.strip()
