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
The choice type determines if a string is in a list of possible choices (name from to the python optparse choice option). This would replace the current heavy usage of string with match(SELF, '^(a|b|c)$') with
"attr"? choice('a', 'b', 'c')
String as a basetype is the most common one (or even only one). makes no sense for boolean i think, and long already has long(1..4) which is something similar. so only float is not covered, which i think is acceptable.
make a new type buitin that does this (we can use function to check type #95 in case someone wants the choice to be usabel via a function function is_choice = {is_type(choice, ARGV);}
a new builtin is_choice and we can make a pantype type choice = string[] with is_choice(SELF)
The text was updated successfully, but these errors were encountered:
The choice type determines if a string is in a list of possible choices (name from to the python optparse choice option). This would replace the current heavy usage of
string with match(SELF, '^(a|b|c)$')
withString as a basetype is the most common one (or even only one). makes no sense for boolean i think, and long already has
long(1..4)
which is something similar. so only float is not covered, which i think is acceptable.Related to quattor/template-library-core#102
To be implemented via one of
choice
to be usabel via a functionfunction is_choice = {is_type(choice, ARGV);}
is_choice
and we can make a pantypetype choice = string[] with is_choice(SELF)
The text was updated successfully, but these errors were encountered: