[Python-Dev] argparse ugliness

Antoine Pitrou solipsis at pitrou.net
Sat Mar 6 03:28:44 CET 2010

Le Fri, 05 Mar 2010 13:51:15 -0500,
Neal Becker <ndbecker2 at gmail.com> a écrit :
> I generally enjoy argparse, but one thing I find rather
> ugly and unpythonic.
>     parser.add_argument ('--plot', action='store_true')

I would argue that a string is actually more Pythonic than
integers or anonymous objects repurposed as magic constants.
(I'm looking at things such as SEEK_SET and friends)

More information about the Python-Dev mailing list