RagtagOpen / nomad

Apache License 2.0
10 stars 22 forks source link

Add 55-seat pool option for #707 #714

Closed AaronSofaer closed 6 years ago

AaronSofaer commented 6 years ago

Fulfills #707, allowing up to 55 seats in a carpool. I'm not sure about the syntax here!

AaronSofaer commented 6 years ago

@iandees I think that still doesn't work because you can't concatenate ranges with + in python3?

iandees commented 6 years ago

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 😄

AaronSofaer commented 6 years ago

I feel dyspeptic about writing out a bunch of digits. Even if it would be just as short. ^_^