We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b330897 commit 4e7485cCopy full SHA for 4e7485c
Doc/library/codecs.rst
@@ -265,6 +265,21 @@ wider range of codecs when working with binary files:
265
:func:`iterencode`.
266
267
268
+.. function:: readbuffer_encode(buffer, errors=None, /)
269
+
270
+ Return a :class:`tuple` containing the raw bytes of *buffer*, a
271
+ :ref:`buffer-compatible object <bufferobjects>` or :class:`str`, and their
272
+ length.
273
274
+ The *errors* argument is ignored and exists only for compatibility with
275
+ other functions.
276
277
+ .. code-block:: pycon
278
279
+ >>> codecs.readbuffer_encode(b"Zito")
280
+ (b'Zito', 4)
281
282
283
The module also provides the following constants which are useful for reading
284
and writing to platform dependent files:
285
0 commit comments