Skip to content

Commit 360ee7f

Browse files
committed
asyncio doc: fix typo in an example
1 parent c9d103c commit 360ee7f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Doc/library/asyncio-eventloop.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -465,8 +465,8 @@ Use :class:`ProactorEventLoop` to support pipes on Windows.
465465
Register write pipe in eventloop.
466466

467467
*protocol_factory* should instantiate object with :class:`BaseProtocol`
468-
interface. *pipe* is file-like object.
469-
Return pair (transport, protocol), where *transport* supports
468+
interface. *pipe* is :term:`file-like object <file object>`.
469+
Return pair ``(transport, protocol)``, where *transport* supports
470470
:class:`WriteTransport` interface.
471471

472472
With :class:`SelectorEventLoop` event loop, the *pipe* is set to
@@ -734,12 +734,12 @@ Wait until a file descriptor received some data using the
734734
def reader():
735735
data = rsock.recv(100)
736736
print("Received:", data.decode())
737-
# We are done: unregister the register
737+
# We are done: unregister the file descriptor
738738
loop.remove_reader(rsock)
739739
# Stop the event loop
740740
loop.stop()
741741

742-
# Wait for read event
742+
# Register the file descriptor for read event
743743
loop.add_reader(rsock, reader)
744744

745745
# Simulate the reception of data from the network
@@ -790,3 +790,5 @@ the :meth:`BaseEventLoop.add_signal_handler` method::
790790
loop.run_forever()
791791
finally:
792792
loop.close()
793+
794+
This example only works on UNIX.

0 commit comments

Comments
 (0)