gh-85308: Add a parameter to argparse.ArgumentParser for file encoding by ZackerySpytz · Pull Request #21444 · python/cpython
Create a new :class:`ArgumentParser` object. All parameters should be passed as keyword arguments. Each parameter has its own more detailed description
* fromfile_encoding_ - The encoding to use when reading files specified by fromfile_prefix_chars_. (default: the system's default encoding)
.. versionchanged:: 3.5 *allow_abbrev* parameter was added.
.. versionchanged:: 3.10 *fromfile_encoding* parameter was added.
The following sections describe how each of these are used.
fromfile_encoding ^^^^^^^^^^^^^^^^^
The ``fromfile_encoding=`` argument specifies the encoding to use when reading files designated by fromfile_prefix_chars_. By default, :class:`ArgumentParser` objects use the system's default encoding.
.. versionadded:: 3.10
The add_argument() method -------------------------