I'm not 100% convinced that it should be called, though feel free to
try writing a patch, and see if it breaks any of the argparse test
suite. If it doesn't break anything, feel free to post it to
bugs.python.org.
Alternatively, you might try using a custom type instead of a custom
action. Unlike custom actions, custom types will be called on default
values (as long as the default value is a string). So you would do
something like:
parser.add_argument('--log-level', type=LogLevel, default='info')
...
args = parser.parse_args()
...
logger.setLevel(args.log_level)
Steve
--
Where did you get that preposterous hypothesis?
Did Steve tell you that?
--- The Hiphopopotamus