From ccd76516f1054d94035077b3b2ec34edab366675 Mon Sep 17 00:00:00 2001 From: Yue JIN <40021217+kingyue737@users.noreply.github.com> Date: Thu, 10 Sep 2020 10:50:17 +0800 Subject: [PATCH] Using python's any function to inherit involved materials' attr Co-authored-by: Paul Romano --- openmc/material.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/openmc/material.py b/openmc/material.py index 8dea2ce0a9..0d4fec808a 100644 --- a/openmc/material.py +++ b/openmc/material.py @@ -1081,10 +1081,7 @@ class Material(IDManagerMixin): # If any of the involved materials is depletable, the new material is # depletable - for mat in materials: - if mat.depletable: - new_mat.depletable = True - break + new_mat.depletable = any(mat.depletable for mat in materials) return new_mat