From 21de086162254240a016bc816bc30bc3923945aa Mon Sep 17 00:00:00 2001 From: "Mohammed S. Yaseen" <51242349+mohasarc@users.noreply.github.com> Date: Mon, 26 Jan 2026 09:24:38 +0000 Subject: [PATCH] use join for section text construction --- src/endf/material.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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()