Does a facility exist to add an argument with a default being a function
that leverages the final parsed Namespace?

For example:

    group  = parser.add_argument_group(' some_group ')
    group.add_argument(
        '--some_group',
        nargs='*',
        type=str
    )
    group.add_argument(
        '-- some_group_def',
        default=func
    )

    args = parser.parse_args()

where func returns a value 'a' if args.some_group or 'b' otherwise?

Obviously I can break that out after but I am curious if the facility exists?

Thanks,
jlc
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to