Closed j-c-cook closed 1 year ago
I missed this change since mixer
/ fluid_str
is not a keyword argument.
@mitchute Do you have specific requirements for the new variable name?
I would say that fluid_str
is more appropriate than mixer
since mixer == 'Water'
is somewhat odd.
Alright I'll update ghedt
then. Please note the following functionality is functional in Python and therefore every argument can be treated as a keyword.
>>> import pygfunction as gt
>>> mixer = 'MEG'
>>> percent = 20
>>> d = {'mixer': mixer, 'percent': percent}
>>> fluid = gt.media.Fluid(**d)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: __init__() got an unexpected keyword argument 'mixer'
>>> d = {'fluid_str': mixer, 'percent': percent}
>>> fluid = gt.media.Fluid(**d)
No specific requirements on my end. It just seemed like a better name, as you noted.
@mitchute changed the name of the first argument in
gt.media.fluid.Fluid
here: https://github.com/MassimoCimmino/pygfunction/pull/232/commits/ac88d2b39373809bc5a52694431a9c4f897a3586.The following code is valid for
pygfunction
version2.2.0
, but not for version2.2.2
.