Choices of int types should be supported #2532
Unanswered
brendan-simon-indt
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In #784 the "resolution" was:
I totally disagree. It does not make sense at all. Why have type conversions at all if that is the case?
Conversion of single value arguments to int is normal. Why does a list of integers pose such a problem for choices?
From a declaration of allowed values of integers it makes perfect sense to specify them as a list of integers.
If it is known the choice type is an integer (e.g. from ChoiceInt or all values are ints, etc, or default value is of type int), then the surely the input can be converted to the desired type and checked to see if it is in the list, and return the matching value.
I don't understand why the reluctance to make a list of choices be type aware.
Similarly floats should also be supported.
Brendan.
Beta Was this translation helpful? Give feedback.
All reactions