[SciPy-Dev] Best practice property storage

vattan vatan.uml at gmail.com
Sun Nov 16 14:20:38 EST 2014


I am working on a module to handle simple fluid and thermal problems.  To
simplify data entry i am storing material properties as dicts named after
the material, ie air{'density':1.2,....} and my functions can just take a
material that is predefined or created by the user and use it assuming the
needed properties are defined.
My concern is this may be too simplistic, for example in the future my
module may need to vary density with temperature, but my current logic is
all material properties are static.  Am I better off using objects to
contain mtl properties so that they can contain functions to modify
inter-related properties?

Thanks guys, hope to get my stuff cleaned up and on github by next weekend.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20141116/0be35eef/attachment.html>


More information about the SciPy-Dev mailing list