Skip to content

Commit 3723370

Browse files
committed
Document that Reader and Writer are generic
1 parent 96080fe commit 3723370

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Doc/library/io.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,7 +1156,9 @@ with :deco:`typing.runtime_checkable`.
11561156

11571157
.. class:: Reader[T]
11581158

1159-
Protocol for reading from a file or other input stream.
1159+
Generic protocol for reading from a file or other input stream. ``T`` will
1160+
usually be :class:`str` or :class:`bytes`, but can be any type that is
1161+
read from the stream.
11601162

11611163
.. versionadded:: next
11621164

@@ -1174,7 +1176,9 @@ with :deco:`typing.runtime_checkable`.
11741176

11751177
.. class:: Writer[T]
11761178

1177-
Protocol for writing to a file or other output stream.
1179+
Generic protocol for writing to a file or other output stream. ``T`` will
1180+
usually be :class:`str` or :class:`bytes`, but can be any type that can be
1181+
written to the stream.
11781182

11791183
.. versionadded:: next
11801184

0 commit comments

Comments
 (0)