You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Another issue related to enumerated parameters is that if you specify a value that doesn't exist, it doesn't generate an error. For example :
for c in commodity(commodity_physics=:i_love_julia)
will not generate an error - which is dangerous - it just silently passes as false and will never be true. One of the rationales for enumerated parameters was to guard against this.
Also, this doesn't generate an error either :
for c in commodity(this_parameter_doesnt_exist=:this_symbol_doesnt_exist_either)
The text was updated successfully, but these errors were encountered:
In GitLab by @manuelma on Apr 29, 2020, 18:45
Another issue related to enumerated parameters is that if you specify a value that doesn't exist, it doesn't generate an error. For example :
for c in commodity(commodity_physics=:i_love_julia)
will not generate an error - which is dangerous - it just silently passes as false and will never be true. One of the rationales for enumerated parameters was to guard against this.
Also, this doesn't generate an error either :
for c in commodity(this_parameter_doesnt_exist=:this_symbol_doesnt_exist_either)
The text was updated successfully, but these errors were encountered: