New GitHub issue #91828 from ltn100:<br>

<hr>

<pre>
The `required` and `default` attributes for arguments are almost always mutually exclusive (I can't think of a reason why you would want to use both for a single argument, or even how you would make use of it).

I am using a 3rd party class that makes use of `ArgumentParser`, and the use case is such that the parser is constructed first, and then default arguments are added later. Some of the arguments are required, unless a default is added at a later time. Would it make sense to clear the respective `action.required` flags whenever `set_defaults()` is called?

Here is a minimal example:
```
>>> parser = argparse.ArgumentParser()
>>> parser.add_argument("--x", required=True)
>>> parser.set_defaults(x=42)  # <-- this should clear the required flag on x
>>> parser.parse_args([])
usage: [-h] --x X
: error: the following arguments are required: --x
```
</pre>

<hr>

<a href="https://github.com/python/cpython/issues/91828">View on GitHub</a>
<p>Labels: type-bug</p>
<p>Assignee: </p>