This library is amazing! I'm not very familiar with GitHub issues so my apologies if I format this incorrectly. Sometimes I'd like to have the user input a whole number (ie. when asking for user age). With the number feature, there doesn't seem to currently be a way to specify an integer as the desired input. When I tried to just specify an integer with type = int, I got a value error. Of course, that's easily fixed by doing this:
try:
number_input = Numbers(prompt="What is your age?\n", type = int ).launch()
except:
print("Please enter a whole number.")
number_input = Numbers(prompt="What is your age?\n", type = int ).launch()
However, I wondered if in the future the package could be designed to handle this problem without the need to use try-expect on the user of the package's end.
Hello!
This library is amazing! I'm not very familiar with GitHub issues so my apologies if I format this incorrectly. Sometimes I'd like to have the user input a whole number (ie. when asking for user age). With the number feature, there doesn't seem to currently be a way to specify an integer as the desired input. When I tried to just specify an integer with
type = int
, I got a value error. Of course, that's easily fixed by doing this:However, I wondered if in the future the package could be designed to handle this problem without the need to use try-expect on the user of the package's end.