> There is a built-in “no value specified” value in Python: the None > singleton. The ‘argparse’ library uses this for the argument default > already, so you don't need to fuss with your own special handling > <URL:http://docs.python.org/library/argparse.html#default>. The problem with this approach is that in both cases of not specifying -e and with -e with no argument the value of args.edit is None. -- http://mail.python.org/mailman/listinfo/python-list
- argparse - option with optional value Miki Tebeka
- Re: argparse - option with optional value Ben Finney
- Re: argparse - option with optional value Miki Tebeka
- Re: argparse - option with optional value Ben Finney
- Re: argparse - option with optional value John O'Hagan