Closed AaronSofaer closed 6 years ago
@iandees I think that still doesn't work because you can't concatenate ranges with + in python3?
Yea true, I was testing that in 2.6. How about itertools.chain
?
import itertools
vehicle_capacity = SelectField(choices=[(str(x), x) for x in itertools.chain(range(1, 9), [55])])
... or just type out the digits one through 8 and 55 😄
I feel dyspeptic about writing out a bunch of digits. Even if it would be just as short. ^_^
Fulfills #707, allowing up to 55 seats in a carpool. I'm not sure about the syntax here!