diff --git a/src/endf/material.py b/src/endf/material.py index 3965603..fae102f 100644 --- a/src/endf/material.py +++ b/src/endf/material.py @@ -153,14 +153,14 @@ def __init__(self, filename_or_obj: Union[PathLike, TextIO], encoding: Optional[ fh.readline() break - section_text = '' + section_lines = [] while True: line = fh.readline() if line[72:75] == ' 0': break else: - section_text += line - self.section_text[MF, MT] = section_text + section_lines.append(line) + self.section_text[MF, MT] = "".join(section_lines) if need_to_close: fh.close()