Closed JaccovdS closed 10 years ago
I was thinking that an 'enum' kind of variable would be nice. do you know if it exists in Python?
The 'enum' in C basically converts your key word to an int (if I'm not mistaken) and so you improve readability.
On 6 June 2014 20:14, Jacco van der Spek notifications@github.com wrote:
In WFR we will have different geometries available for the reconstruction. My suggestion is that an extra parameter will be passed to the WFR function in order to select a geometry. I propose to use an int as parameter. With the following convention: 1) Fried 2) Southwell 3) Modified Hudgin
Does everybody agree or do you have smarter solutions?
— Reply to this email directly or view it on GitHub https://github.com/faitdivers/pyao/issues/64.
Yes that would be nice, I'm going to Google that :)
Yeah, but our Python is 2.7. Oh well, I think an int is good enough.
On 6 June 2014 23:35, Jacco van der Spek notifications@github.com wrote:
http://stackoverflow.com/questions/36932/how-can-i-represent-an-enum-in-python
— Reply to this email directly or view it on GitHub https://github.com/faitdivers/pyao/issues/64#issuecomment-45386802.
Apparently is has been backported to 2.7. So we can use it.
Solved by adding an extra 'geometry' parameter to simulation parameters. Then using just string comparison which is sufficient for the moment.
In WFR we will have different geometries available for the reconstruction. My suggestion is that an extra parameter will be passed to the WFR function in order to select a geometry. I propose to use an int as parameter. With the following convention: 1) Fried 2) Southwell 3) Modified Hudgin
Does everybody agree or do you have smarter solutions?