Skip to content

Commit 3568f2a

Browse files
further clarify docs
1 parent 0158890 commit 3568f2a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Doc/library/asyncio-stream.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,13 +316,14 @@ StreamWriter
316316
If that fails, the data is queued in an internal write buffer until it can be
317317
sent.
318318

319+
The *data* buffer should be a bytes, bytearray, or C-contiguous one-dimensional
320+
memoryview object.
321+
319322
The method should be used along with the ``drain()`` method::
320323

321324
stream.write(data)
322325
await stream.drain()
323326

324-
.. note::
325-
The *data* buffer should be a C contiguous one-dimensional :term:`bytes-like object <bytes-like object>`.
326327

327328
.. method:: writelines(data)
328329

0 commit comments

Comments
 (0)