diff options
Diffstat (limited to 'numpy/lib/format.py')
-rw-r--r-- | numpy/lib/format.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/lib/format.py b/numpy/lib/format.py index 89a8cb42f..363bb2101 100644 --- a/numpy/lib/format.py +++ b/numpy/lib/format.py @@ -455,8 +455,8 @@ def _filter_header(s): tokens = [] last_token_was_number = False # adding newline as python 2.7.5 workaround - s += "\n" - for token in tokenize.generate_tokens(StringIO(asstr(s)).readline): + string = asstr(s) + "\n" + for token in tokenize.generate_tokens(StringIO(string).readline): token_type = token[0] token_string = token[1] if (last_token_was_number and |