8000 Simplify the docs/improve formatting · python/cpython@5d632a3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5d632a3

Browse files
committed
Simplify the docs/improve formatting
1 parent 6a22a02 commit 5d632a3

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

Doc/library/typing.rst

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2821,11 +2821,8 @@ decorated with :func:`@runtime_checkable <runtime_checkable>`.
28212821

28222822
.. class:: Reader[T]
28232823

2824-
Protocol for reading from a file or other input stream.
2825-
2826-
.. method:: read(size=...)
2827-
.. method:: readline(size=...)
2828-
.. method:: __iter__()
2824+
Protocol for reading from a file or other input stream. Implementations
2825+
must support the ``read``, ``readline``, and ``__iter__`` methods.
28292826

28302827
For example::
28312828

@@ -2836,9 +2833,8 @@ decorated with :func:`@runtime_checkable <runtime_checkable>`.
28362833

28372834
.. class:: Writer[T]
28382835

2839-
Protocol for writing to a file or other output stream.
2840-
2841-
.. method:: write(o)
2836+
Protocol for writing to a file or other output stream. Implementations
2837+
must support the ``write`` method.
28422838

28432839
For example::
28442840

0 commit comments

Comments
 (0)
0