# HG changeset patch # User Jeff Hammel # Date 1418350030 28800 # Node ID df5350aee9c3113ffebfa54847d5cfa191f79739 # Parent 2825b0fdf80ece6cb9a159c14b06b26216324f1d not sure what i did here diff -r 2825b0fdf80e -r df5350aee9c3 example/argparse_undefined.py --- a/example/argparse_undefined.py Mon Dec 01 18:24:01 2014 -0800 +++ b/example/argparse_undefined.py Thu Dec 11 18:07:10 2014 -0800 @@ -16,9 +16,10 @@ def __init__(self, *args, **kwargs): argparse.ArgumentParser.__init__(self, *args, **kwargs) + self.__defaults = {} def add_argument(self, *args, **kwargs): - kwargs.setdefault('default', Undefined) + default = kwargs.pop('default', self.argument_default) return argparse.ArgumentParser.add_argument def main(args=sys.argv[1:]):