Message288737
It's not clear what you expected the behaviour to be. A function cannot both raise an exception and return a value.
In any case, you are correct in saying "the next option, '-d', is taken as the argument." I do not think this is a bug. See <http://pubs.opengroup.org/onlinepubs/9699919799/functions/getopt.html> for the Posix specification of "getopt".
Perhaps you are confused by a bug or quirk of "argparse", where it treats most CLI arguments that begin with a dash specially, even if according to Posix they would be associated with an option. See Issue 9334. |
|
Date |
User |
Action |
Args |
2017-03-01 05:28:27 | martin.panter | set | recipients:
+ martin.panter, Marshall Giguere |
2017-03-01 05:28:27 | martin.panter | set | messageid: <1488346107.78.0.509589316751.issue29681@psf.upfronthosting.co.za> |
2017-03-01 05:28:27 | martin.panter | link | issue29681 messages |
2017-03-01 05:28:27 | martin.panter | create | |
|