Skip to content

Commit 71631af

Browse files
committed
infer variable name from Stream.copy()
1 parent b458050 commit 71631af

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

thermosteam/_stream.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2040,6 +2040,12 @@ def copy(self, ID=None, thermo=None):
20402040
Prices, and LCA characterization factors are not copied.
20412041
20422042
"""
2043+
if tmo.settings.ID_magic:
2044+
if ID == None:
2045+
ID = tmo.utils.infer_variable_assignment(self.copy)
2046+
if ID != '-': ID = '.' + ID
2047+
elif ID == '':
2048+
ID = tmo.utils.infer_variable_assignment(self.copy)
20432049
cls = self.__class__
20442050
if thermo is not None:
20452051
new = cls(ID=ID, thermo=thermo)

0 commit comments

Comments
 (0)