David Mayo writes: > I mean, it's definitely possible, but I'd argue that's actually not any > more explicit - and, in fact, args.stuff = something(args.stuff) is > arguably less explicit because it's just an arbitrary transform, rather > than being called out as "this is the wrapper element for these > args."
The problem is third parties trying to read and work with the code, who now have to go read not only the definition of the parser, but the definition of the wrapper element (which is an arbitrary transform with a specified role). I think argparse is complex enough already. For both of your use cases (argparsers as reusable components and validation of collection arguments), I don't see why they can't be done in a subclass. This argument doesn't kill your proposal, and I'm just one rando, but FWIW I'm -0.5 on it for now. Steve _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/