◐ Shell
clean mode source ↗

Argparse choices should be a sequence

Documentation

Instead of saying "any container" is supported, refer only to "sequences".

Technically, a Container is only required to support __contains__ which is insufficent for argparse. Also, a sets do get accepted are a bad choice because the order shown in help and usage is non-deterministic. So, Sequence is the only reasonable choice because we need sizing and ordered iteration.

Linked PRs