diff --git a/Doc/library/importlib.resources.abc.rst b/Doc/library/importlib.resources.abc.rst index 45979c5691270aa..0c9f795a738c6f7 100644 --- a/Doc/library/importlib.resources.abc.rst +++ b/Doc/library/importlib.resources.abc.rst @@ -157,8 +157,8 @@ *mode* may be 'r' or 'rb' to open as text or binary. Return a handle suitable for reading (same as :attr:`pathlib.Path.open`). - When opening as text, accepts encoding parameters such as those - accepted by :class:`io.TextIOWrapper`. + When opening as text, accepts the *encoding*, *errors*, and *newline* + keyword arguments with the same meanings as in :class:`io.TextIOWrapper`. .. method:: read_bytes() diff --git a/Lib/importlib/resources/abc.py b/Lib/importlib/resources/abc.py index 0b5fdee80e87964..7cd5401314cedb9 100644 --- a/Lib/importlib/resources/abc.py +++ b/Lib/importlib/resources/abc.py @@ -154,8 +154,8 @@ def open(self, mode: str = 'r', *args: Any, **kwargs: Any) -> TextIO | BinaryIO: mode may be 'r' or 'rb' to open as text or binary. Return a handle suitable for reading (same as pathlib.Path.open). - When opening as text, accepts encoding parameters such as those - accepted by io.TextIOWrapper. + When opening as text, accepts the encoding, errors, and newline + keyword arguments with the same meanings as in io.TextIOWrapper. """ @property