Open
Description
This little program here:
#!/usr/bin/env python
"""
Usage:
test.py [--to=SITE]... [--] FILE...
test.py [--to=SITE]... --config CONFIG [[--] FILE...]
Options:
--config CONFIG Configuration file.
--to=SITE Target site
"""
import docopt
options = docopt.docopt(__doc__)
print(options)
If I run test.py --to a --to b c
, I get this output:
{'--': False,
'--config': None,
'--to': ['a', 'b', 'b'],
'FILE': ['c']}
Notice the double occurrence of 'b'