chunk_id stringlengths 36 36 | source stringclasses 35
values | source_url stringlengths 0 290 | upstream_license stringclasses 1
value | document_id stringlengths 36 36 | chunk_index int64 0 324k | retrieved_at stringclasses 2
values | chunker_version stringclasses 4
values | content_hash stringlengths 15 64 | content stringlengths 50 44.7k | namespace stringclasses 9
values | source_name stringclasses 35
values | raw_text stringlengths 50 44.7k | cleaned_text stringlengths 50 44.7k | tags stringclasses 49
values | collection_name stringclasses 11
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
aeed060f-42ed-49cd-abb8-c4e7765dd9b1 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,369 | supabase-export-v2 | 0246a7db1a08fb11 | .. method:: getstate()
Return the current state of the encoder which must be an integer. The
implementation should make sure that ``0`` is the most common
state. (States that are more complicated than integers can be converted
into an integer by marshaling/pickling the state and encoding the bytes
of the resulting ... | trusted_official_docs | CPython Docs | .. method:: getstate()
Return the current state of the encoder which must be an integer. The
implementation should make sure that ``0`` is the most common
state. (States that are more complicated than integers can be converted
into an integer by marshaling/pickling the state and encoding the bytes
of the resulting ... | .. method:: getstate()
Return the current state of the encoder which must be an integer. The
implementation should make sure that ``0`` is the most common
state. (States that are more complicated than integers can be converted
into an integer by marshaling/pickling the state and encoding the bytes
of the resulting ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
afb28fc0-bbf5-4889-9f16-77e9aff38fe9 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,574 | supabase-export-v2 | 6c2d78bfe2e7f848 | .. module:: encodings.utf_8_sig :synopsis: UTF-8 codec with BOM signature
This module implements a variant of the UTF-8 codec. On encoding, a UTF-8 encoded
BOM will be prepended to the UTF-8 encoded bytes. For the stateful encoder this
is only done once (on the first write to the byte stream). On decoding, an
optional ... | trusted_official_docs | CPython Docs | .. module:: encodings.utf_8_sig :synopsis: UTF-8 codec with BOM signature
This module implements a variant of the UTF-8 codec. On encoding, a UTF-8 encoded
BOM will be prepended to the UTF-8 encoded bytes. For the stateful encoder this
is only done once (on the first write to the byte stream). On decoding, an
optional ... | .. module:: encodings.utf_8_sig :synopsis: UTF-8 codec with BOM signature
This module implements a variant of the UTF-8 codec. On encoding, a UTF-8 encoded
BOM will be prepended to the UTF-8 encoded bytes. For the stateful encoder this
is only done once (on the first write to the byte stream). On decoding, an
optional ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b14e126b-3b05-423b-a602-3b67cc47300d | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,543 | supabase-export-v2 | be3e2bd65e3485a7 | the normalized name. If the module is found and defines a valid ``getregentry()`` function that returns a :class:`codecs.CodecInfo` object, the codec is cached and returned.
If the codec module defines a ``getaliases()`` function any returned aliases
are registered for future use. | trusted_official_docs | CPython Docs | the normalized name. If the module is found and defines a valid ``getregentry()`` function that returns a :class:`codecs.CodecInfo` object, the codec is cached and returned.
If the codec module defines a ``getaliases()`` function any returned aliases
are registered for future use. | the normalized name. If the module is found and defines a valid ``getregentry()`` function that returns a :class:`codecs.CodecInfo` object, the codec is cached and returned.
If the codec module defines a ``getaliases()`` function any returned aliases
are registered for future use. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b1a6a285-8e80-449f-8854-245b522d412b | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,350 | supabase-export-v2 | 12f7816910ec6051 | bytes-to-bytes codecs, *input* must be a bytes object or one which provides the read-only buffer interface -- for example, buffer objects and memory mapped files.
The *errors* argument defines the error handling to apply. It defaults to ``'strict'`` handling. | trusted_official_docs | CPython Docs | bytes-to-bytes codecs, *input* must be a bytes object or one which provides the read-only buffer interface -- for example, buffer objects and memory mapped files.
The *errors* argument defines the error handling to apply. It defaults to ``'strict'`` handling. | bytes-to-bytes codecs, *input* must be a bytes object or one which provides the read-only buffer interface -- for example, buffer objects and memory mapped files.
The *errors* argument defines the error handling to apply. It defaults to ``'strict'`` handling. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b3bee410-c397-4588-a3ce-7956f1568e5b | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,414 | supabase-export-v2 | 8bd7936f0847cf70 | The *stream* argument must be a file-like object open for reading text or binary data, as appropriate for the specific codec.
The :class:`StreamReader` may implement different error handling schemes by
providing the *errors* keyword argument. See :ref:`error-handlers` for
the standard error handlers the underlying st... | trusted_official_docs | CPython Docs | The *stream* argument must be a file-like object open for reading text or binary data, as appropriate for the specific codec.
The :class:`StreamReader` may implement different error handling schemes by
providing the *errors* keyword argument. See :ref:`error-handlers` for
the standard error handlers the underlying st... | The *stream* argument must be a file-like object open for reading text or binary data, as appropriate for the specific codec.
The :class:`StreamReader` may implement different error handling schemes by
providing the *errors* keyword argument. See :ref:`error-handlers` for
the standard error handlers the underlying st... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b429802e-bf7e-4c30-97a6-479749e46f00 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,272 | supabase-export-v2 | 8163be203903e43f | yield :class:`str` objects. This function is a :term:`generator`. The *errors* argument (as well as any other keyword argument) is passed through to the incremental encoder.
This function requires that the codec accept text :class:`str` objects
to encode. Therefore it does not support bytes-to-bytes encoders such as
... | trusted_official_docs | CPython Docs | yield :class:`str` objects. This function is a :term:`generator`. The *errors* argument (as well as any other keyword argument) is passed through to the incremental encoder.
This function requires that the codec accept text :class:`str` objects
to encode. Therefore it does not support bytes-to-bytes encoders such as
... | yield :class:`str` objects. This function is a :term:`generator`. The *errors* argument (as well as any other keyword argument) is passed through to the incremental encoder.
This function requires that the codec accept text :class:`str` objects
to encode. Therefore it does not support bytes-to-bytes encoders such as
... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bad76542-caaa-46be-8fed-bd16295b0b5a | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,260 | supabase-export-v2 | 993384cd9d980a9f | Any encoding that encodes to and decodes from bytes is allowed, and the data types supported by the file methods depend on the codec used.
*errors* may be given to define the error handling. It defaults to ``'strict'``
which causes a :exc:`ValueError` to be raised in case an encoding error occurs. | trusted_official_docs | CPython Docs | Any encoding that encodes to and decodes from bytes is allowed, and the data types supported by the file methods depend on the codec used.
*errors* may be given to define the error handling. It defaults to ``'strict'``
which causes a :exc:`ValueError` to be raised in case an encoding error occurs. | Any encoding that encodes to and decodes from bytes is allowed, and the data types supported by the file methods depend on the codec used.
*errors* may be given to define the error handling. It defaults to ``'strict'``
which causes a :exc:`ValueError` to be raised in case an encoding error occurs. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bcb4f88f-64bd-42c3-a959-eaf2f2b47b17 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,510 | supabase-export-v2 | 694954fb08b57242 | per byte. | | +----------------------+------------------+------------------------------+------------------------------+ | quopri_codec | quopri, | Convert the operand to MIME | :meth:`quopri.encode` with | | | quotedprintable, | quoted printable.
| ``quotetabs=True`` / |
| | quoted_printable | | :meth:`quopri.decode` |... | trusted_official_docs | CPython Docs | per byte. | | +----------------------+------------------+------------------------------+------------------------------+ | quopri_codec | quopri, | Convert the operand to MIME | :meth:`quopri.encode` with | | | quotedprintable, | quoted printable.
| ``quotetabs=True`` / |
| | quoted_printable | | :meth:`quopri.decode` |... | per byte. | | +----------------------+------------------+------------------------------+------------------------------+ | quopri_codec | quopri, | Convert the operand to MIME | :meth:`quopri.encode` with | | | quotedprintable, | quoted printable.
| ``quotetabs=True`` / |
| | quoted_printable | | :meth:`quopri.decode` |... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bdd34079-f899-4ff2-9ea2-7d005fe1fca3 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,447 | supabase-export-v2 | a7d9a56244ce44e3 | .. class:: StreamRecoder(stream, encode, decode, Reader, Writer, errors='strict')
Creates a :class:`StreamRecoder` instance which implements a two-way conversion:
*encode* and *decode* work on the frontend — the data visible to
code calling :meth:`~StreamReader.read` and :meth:`~StreamWriter.write`,
while *Reader* a... | trusted_official_docs | CPython Docs | .. class:: StreamRecoder(stream, encode, decode, Reader, Writer, errors='strict')
Creates a :class:`StreamRecoder` instance which implements a two-way conversion:
*encode* and *decode* work on the frontend — the data visible to
code calling :meth:`~StreamReader.read` and :meth:`~StreamWriter.write`,
while *Reader* a... | .. class:: StreamRecoder(stream, encode, decode, Reader, Writer, errors='strict')
Creates a :class:`StreamRecoder` instance which implements a two-way conversion:
*encode* and *decode* work on the frontend — the data visible to
code calling :meth:`~StreamReader.read` and :meth:`~StreamWriter.write`,
while *Reader* a... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bfbed6f6-a414-404d-8c57-7ea386ea941d | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,422 | supabase-export-v2 | 742661bf56abd8dc | The *firstline* flag indicates that it would be sufficient to only return the first line, if there are decoding errors on later lines.
The method should use a greedy read strategy meaning that it should read
as much data as is allowed within the definition of the encoding and the
given size, e.g. if optional encoding... | trusted_official_docs | CPython Docs | The *firstline* flag indicates that it would be sufficient to only return the first line, if there are decoding errors on later lines.
The method should use a greedy read strategy meaning that it should read
as much data as is allowed within the definition of the encoding and the
given size, e.g. if optional encoding... | The *firstline* flag indicates that it would be sufficient to only return the first line, if there are decoding errors on later lines.
The method should use a greedy read strategy meaning that it should read
as much data as is allowed within the definition of the encoding and the
given size, e.g. if optional encoding... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c0ac3451-c2e2-4fff-a2a5-8bf9994e2557 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,297 | supabase-export-v2 | b9af0a444f57f90c | with formats :samp:`\\x{hh}` | | | :samp:`\\u{xxxx}` :samp:`\\U{xxxxxxxx}`. | | | On decoding, use hexadecimal form of byte | | | value with format :samp:`\\x{hh}`.
|
| | Implemented in |
| | :func:`backslashreplace_errors`. |
+-------------------------+-----------------------------------------------+
| ``'surrogateesc... | trusted_official_docs | CPython Docs | with formats :samp:`\\x{hh}` | | | :samp:`\\u{xxxx}` :samp:`\\U{xxxxxxxx}`. | | | On decoding, use hexadecimal form of byte | | | value with format :samp:`\\x{hh}`.
|
| | Implemented in |
| | :func:`backslashreplace_errors`. |
+-------------------------+-----------------------------------------------+
| ``'surrogateesc... | with formats :samp:`\\x{hh}` | | | :samp:`\\u{xxxx}` :samp:`\\U{xxxxxxxx}`. | | | On decoding, use hexadecimal form of byte | | | value with format :samp:`\\x{hh}`.
|
| | Implemented in |
| | :func:`backslashreplace_errors`. |
+-------------------------+-----------------------------------------------+
| ``'surrogateesc... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c391f82a-1d6b-4e23-8de4-f8e5c778442f | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,224 | supabase-export-v2 | d5b629acc6a77fc4 | .. attribute:: encode decode
The stateless encoding and decoding functions. These must be
functions or methods which have the same interface as
the :meth:`~Codec.encode` and :meth:`~Codec.decode` methods of Codec
instances (see :ref:`Codec Interface <codec-objects>`). The functions or methods are expected to work in... | trusted_official_docs | CPython Docs | .. attribute:: encode decode
The stateless encoding and decoding functions. These must be
functions or methods which have the same interface as
the :meth:`~Codec.encode` and :meth:`~Codec.decode` methods of Codec
instances (see :ref:`Codec Interface <codec-objects>`). The functions or methods are expected to work in... | .. attribute:: encode decode
The stateless encoding and decoding functions. These must be
functions or methods which have the same interface as
the :meth:`~Codec.encode` and :meth:`~Codec.decode` methods of Codec
instances (see :ref:`Codec Interface <codec-objects>`). The functions or methods are expected to work in... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c41fd314-98c7-4a8d-9c36-fa2f44e663a2 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,218 | supabase-export-v2 | 669e31efe27ddfa3 | scanned. If no :class:`CodecInfo` object is found, a :exc:`LookupError` is raised. Otherwise, the :class:`CodecInfo` object is stored in the cache and returned to the caller.
.. versionchanged:: 3.9
Any characters except ASCII letters and digits and a dot are converted to underscore. | trusted_official_docs | CPython Docs | scanned. If no :class:`CodecInfo` object is found, a :exc:`LookupError` is raised. Otherwise, the :class:`CodecInfo` object is stored in the cache and returned to the caller.
.. versionchanged:: 3.9
Any characters except ASCII letters and digits and a dot are converted to underscore. | scanned. If no :class:`CodecInfo` object is found, a :exc:`LookupError` is raised. Otherwise, the :class:`CodecInfo` object is stored in the cache and returned to the caller.
.. versionchanged:: 3.9
Any characters except ASCII letters and digits and a dot are converted to underscore. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c491d826-6867-4426-8194-d782c92c7153 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,457 | supabase-export-v2 | ceb222a8f686db27 | the following (although the details of the error message may differ): ``UnicodeEncodeError: 'latin-1' codec can't encode character '\u1234' in position 3: ordinal not in range(256)``.
There's another group of encodings (the so called charmap encodings) that choose
a different subset of all Unicode code points and how t... | trusted_official_docs | CPython Docs | the following (although the details of the error message may differ): ``UnicodeEncodeError: 'latin-1' codec can't encode character '\u1234' in position 3: ordinal not in range(256)``.
There's another group of encodings (the so called charmap encodings) that choose
a different subset of all Unicode code points and how t... | the following (although the details of the error message may differ): ``UnicodeEncodeError: 'latin-1' codec can't encode character '\u1234' in position 3: ordinal not in range(256)``.
There's another group of encodings (the so called charmap encodings) that choose
a different subset of all Unicode code points and how t... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c4b7e8d1-dc8f-4c48-bb0d-914a7395edfd | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,254 | supabase-export-v2 | 7f0f71443ea8cb0e | .. versionadded:: 3.10
While the builtin :func:`open` and the associated :mod:`io` module are the
recommended approach for working with encoded text files, this module
provides additional utility functions and classes that allow the use of a
wider range of codecs when working with binary files: | trusted_official_docs | CPython Docs | .. versionadded:: 3.10
While the builtin :func:`open` and the associated :mod:`io` module are the
recommended approach for working with encoded text files, this module
provides additional utility functions and classes that allow the use of a
wider range of codecs when working with binary files: | .. versionadded:: 3.10
While the builtin :func:`open` and the associated :mod:`io` module are the
recommended approach for working with encoded text files, this module
provides additional utility functions and classes that allow the use of a
wider range of codecs when working with binary files: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ccf97e7b-eba4-4f47-a1b7-0aa191348bf2 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,501 | supabase-export-v2 | c200691f59e92834 | source code, | | | | except that quotes are | | | | not escaped. Decode | | | | from Latin-1 source code.
|
| | | Beware that Python source |
| | | code actually uses UTF-8 |
| | | by default. |
+--------------------+---------+---------------------------+ | trusted_official_docs | CPython Docs | source code, | | | | except that quotes are | | | | not escaped. Decode | | | | from Latin-1 source code.
|
| | | Beware that Python source |
| | | code actually uses UTF-8 |
| | | by default. |
+--------------------+---------+---------------------------+ | source code, | | | | except that quotes are | | | | not escaped. Decode | | | | from Latin-1 source code.
|
| | | Beware that Python source |
| | | code actually uses UTF-8 |
| | | by default. |
+--------------------+---------+---------------------------+ | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
cd0c957f-60c7-4d60-be8e-f14d6fd531ac | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,484 | supabase-export-v2 | f9d71ba15ebc6fed | .. tabularcolumns:: |l|p{0.3\linewidth}|p{0.3\linewidth}|
+-----------------+--------------------------------+--------------------------------+
| Codec | Aliases | Languages |
+=================+================================+================================+
| ascii | 646, us-ascii | English |
+-----------------+---... | trusted_official_docs | CPython Docs | .. tabularcolumns:: |l|p{0.3\linewidth}|p{0.3\linewidth}|
+-----------------+--------------------------------+--------------------------------+
| Codec | Aliases | Languages |
+=================+================================+================================+
| ascii | 646, us-ascii | English |
+-----------------+---... | .. tabularcolumns:: |l|p{0.3\linewidth}|p{0.3\linewidth}|
+-----------------+--------------------------------+--------------------------------+
| Codec | Aliases | Languages |
+=================+================================+================================+
| ascii | 646, us-ascii | English |
+-----------------+---... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d057f151-d3cb-4a71-9135-b75a8509307f | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,258 | supabase-export-v2 | 85de5df1ffd4d0bd | .. note::
If *encoding* is not ``None``, then the
underlying encoded files are always opened in binary mode. No automatic conversion of ``'\n'`` is done on reading and writing. The *mode* argument may be any binary mode acceptable to the built-in
:func:`open` function; the ``'b'`` is automatically added. | trusted_official_docs | CPython Docs | .. note::
If *encoding* is not ``None``, then the
underlying encoded files are always opened in binary mode. No automatic conversion of ``'\n'`` is done on reading and writing. The *mode* argument may be any binary mode acceptable to the built-in
:func:`open` function; the ``'b'`` is automatically added. | .. note::
If *encoding* is not ``None``, then the
underlying encoded files are always opened in binary mode. No automatic conversion of ``'\n'`` is done on reading and writing. The *mode* argument may be any binary mode acceptable to the built-in
:func:`open` function; the ``'b'`` is automatically added. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d09410c8-459c-4996-95e3-807ae41aaefb | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,296 | supabase-export-v2 | 5b439cebdf1e166b | malformed data and continue without| | | further notice. Implemented in | | | :func:`ignore_errors`. | +-------------------------+-----------------------------------------------+ | ``'replace'`` | Replace with a replacement marker.
On |
| | encoding, use ``?`` (ASCII character). On |
| | decoding, use ``�`` (U+FFFD, th... | trusted_official_docs | CPython Docs | malformed data and continue without| | | further notice. Implemented in | | | :func:`ignore_errors`. | +-------------------------+-----------------------------------------------+ | ``'replace'`` | Replace with a replacement marker.
On |
| | encoding, use ``?`` (ASCII character). On |
| | decoding, use ``�`` (U+FFFD, th... | malformed data and continue without| | | further notice. Implemented in | | | :func:`ignore_errors`. | +-------------------------+-----------------------------------------------+ | ``'replace'`` | Replace with a replacement marker.
On |
| | encoding, use ``?`` (ASCII character). On |
| | decoding, use ``�`` (U+FFFD, th... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d2576085-0468-47f3-a428-7ebd9bf13a5f | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,286 | supabase-export-v2 | bcc2704de2abe974 | Codec Base Classes ------------------
The :mod:`!codecs` module defines a set of base classes which define the
interfaces for working with codec objects, and can also be used as the basis
for custom codec implementations. | trusted_official_docs | CPython Docs | Codec Base Classes ------------------
The :mod:`!codecs` module defines a set of base classes which define the
interfaces for working with codec objects, and can also be used as the basis
for custom codec implementations. | Codec Base Classes ------------------
The :mod:`!codecs` module defines a set of base classes which define the
interfaces for working with codec objects, and can also be used as the basis
for custom codec implementations. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d34a3534-2a80-4604-b362-c7bef01e50e0 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,271 | supabase-export-v2 | aa9ffa9d8e001b7e | .. function:: iterencode(iterator, encoding, errors='strict', **kwargs)
Uses an incremental encoder to iteratively encode the input provided by
*iterator*. *iterator* must yield :class:`str` objects. This function is a :term:`generator`. The *errors* argument (as well as any
other keyword argument) is passed through ... | trusted_official_docs | CPython Docs | .. function:: iterencode(iterator, encoding, errors='strict', **kwargs)
Uses an incremental encoder to iteratively encode the input provided by
*iterator*. *iterator* must yield :class:`str` objects. This function is a :term:`generator`. The *errors* argument (as well as any
other keyword argument) is passed through ... | .. function:: iterencode(iterator, encoding, errors='strict', **kwargs)
Uses an incremental encoder to iteratively encode the input provided by
*iterator*. *iterator* must yield :class:`str` objects. This function is a :term:`generator`. The *errors* argument (as well as any
other keyword argument) is passed through ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d57866ac-d8b5-4c67-b58c-39805483b0c1 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,493 | supabase-export-v2 | 738bc2a209453485 | Python Specific Encodings -------------------------
A number of predefined codecs are specific to Python, so their codec names have
no meaning outside Python. These are listed in the tables below based on the
expected input and output types (note that while text encodings are the most
common use case for codecs, the un... | trusted_official_docs | CPython Docs | Python Specific Encodings -------------------------
A number of predefined codecs are specific to Python, so their codec names have
no meaning outside Python. These are listed in the tables below based on the
expected input and output types (note that while text encodings are the most
common use case for codecs, the un... | Python Specific Encodings -------------------------
A number of predefined codecs are specific to Python, so their codec names have
no meaning outside Python. These are listed in the tables below based on the
expected input and output types (note that while text encodings are the most
common use case for codecs, the un... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d5fd0e48-56b6-4c7b-b777-9b9c53689393 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,362 | supabase-export-v2 | e40f943dc10de20d | provide this constructor interface. They are free to add additional keyword arguments, but only the ones defined here are used by the Python codec registry.
The :class:`IncrementalEncoder` may implement different error handling schemes
by providing the *errors* keyword argument. See :ref:`error-handlers` for
possible... | trusted_official_docs | CPython Docs | provide this constructor interface. They are free to add additional keyword arguments, but only the ones defined here are used by the Python codec registry.
The :class:`IncrementalEncoder` may implement different error handling schemes
by providing the *errors* keyword argument. See :ref:`error-handlers` for
possible... | provide this constructor interface. They are free to add additional keyword arguments, but only the ones defined here are used by the Python codec registry.
The :class:`IncrementalEncoder` may implement different error handling schemes
by providing the *errors* keyword argument. See :ref:`error-handlers` for
possible... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d60a5494-706f-46a2-9a11-0cb83c26cf99 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,395 | supabase-export-v2 | 3aa807e4003478e9 | Constructor for a :class:`StreamWriter` instance.
All stream writers must provide this constructor interface. They are free to add
additional keyword arguments, but only the ones defined here are used by the
Python codec registry. | trusted_official_docs | CPython Docs | Constructor for a :class:`StreamWriter` instance.
All stream writers must provide this constructor interface. They are free to add
additional keyword arguments, but only the ones defined here are used by the
Python codec registry. | Constructor for a :class:`StreamWriter` instance.
All stream writers must provide this constructor interface. They are free to add
additional keyword arguments, but only the ones defined here are used by the
Python codec registry. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d7d03f0e-5e98-4125-8d01-2a29d49b659b | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,415 | supabase-export-v2 | 9f01ae59baef575a | may implement different error handling schemes by providing the *errors* keyword argument. See :ref:`error-handlers` for the standard error handlers the underlying stream codec may support.
The *errors* argument will be assigned to an attribute of the same name. Assigning to this attribute makes it possible to switch b... | trusted_official_docs | CPython Docs | may implement different error handling schemes by providing the *errors* keyword argument. See :ref:`error-handlers` for the standard error handlers the underlying stream codec may support.
The *errors* argument will be assigned to an attribute of the same name. Assigning to this attribute makes it possible to switch b... | may implement different error handling schemes by providing the *errors* keyword argument. See :ref:`error-handlers` for the standard error handlers the underlying stream codec may support.
The *errors* argument will be assigned to an attribute of the same name. Assigning to this attribute makes it possible to switch b... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d9055caf-7535-4668-81a2-5c0a3bfa4d52 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,420 | supabase-export-v2 | a29f092696bb1835 | or bytes to return. The :func:`read` method will never return more data than requested, but it might return less, if there is not enough available.
The *size* argument indicates the approximate maximum
number of encoded bytes or code points to read
for decoding. The decoder can modify this setting as
appropriate. Th... | trusted_official_docs | CPython Docs | or bytes to return. The :func:`read` method will never return more data than requested, but it might return less, if there is not enough available.
The *size* argument indicates the approximate maximum
number of encoded bytes or code points to read
for decoding. The decoder can modify this setting as
appropriate. Th... | or bytes to return. The :func:`read` method will never return more data than requested, but it might return less, if there is not enough available.
The *size* argument indicates the approximate maximum
number of encoded bytes or code points to read
for decoding. The decoder can modify this setting as
appropriate. Th... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
df512e1c-ccb2-4c4e-bd63-4991417cb7ca | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,266 | supabase-export-v2 | dfb1b6ea7c996911 | .. function:: EncodedFile(file, data_encoding, file_encoding=None, errors='strict')
Return a :class:`StreamRecoder` instance, a wrapped version of *file*
which provides transparent transcoding. The original file is closed
when the wrapped version is closed. | trusted_official_docs | CPython Docs | .. function:: EncodedFile(file, data_encoding, file_encoding=None, errors='strict')
Return a :class:`StreamRecoder` instance, a wrapped version of *file*
which provides transparent transcoding. The original file is closed
when the wrapped version is closed. | .. function:: EncodedFile(file, data_encoding, file_encoding=None, errors='strict')
Return a :class:`StreamRecoder` instance, a wrapped version of *file*
which provides transparent transcoding. The original file is closed
when the wrapped version is closed. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
df59d2da-8ac4-4ccf-b745-ccf34907ebee | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,433 | supabase-export-v2 | ad81981bee62dd48 | Resets the codec buffers used for keeping internal state.
Note that no stream repositioning should take place. This method is
primarily intended to be able to recover from decoding errors. | trusted_official_docs | CPython Docs | Resets the codec buffers used for keeping internal state.
Note that no stream repositioning should take place. This method is
primarily intended to be able to recover from decoding errors. | Resets the codec buffers used for keeping internal state.
Note that no stream repositioning should take place. This method is
primarily intended to be able to recover from decoding errors. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
dfb3b31d-0845-4e2c-b51a-1ac459379adc | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,452 | supabase-export-v2 | 82960b70a28845a0 | Error handling is done in the same way as defined for the stream readers and writers.
:class:`StreamRecoder` instances define the combined interfaces of
:class:`StreamReader` and :class:`StreamWriter` classes. They inherit all other
methods and attributes from the underlying stream. | trusted_official_docs | CPython Docs | Error handling is done in the same way as defined for the stream readers and writers.
:class:`StreamRecoder` instances define the combined interfaces of
:class:`StreamReader` and :class:`StreamWriter` classes. They inherit all other
methods and attributes from the underlying stream. | Error handling is done in the same way as defined for the stream readers and writers.
:class:`StreamRecoder` instances define the combined interfaces of
:class:`StreamReader` and :class:`StreamWriter` classes. They inherit all other
methods and attributes from the underlying stream. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
dfc331a3-ed2d-41e2-96f3-7f103c85db9e | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,208 | supabase-export-v2 | 6ad3e2d4e39f59a9 | Encodes *obj* using the codec registered for *encoding*.
*Errors* may be given to set the desired error handling scheme. The
default error handler is ``'strict'`` meaning that encoding errors raise
:exc:`ValueError` (or a more codec specific subclass, such as
:exc:`UnicodeEncodeError`). Refer to :ref:`codec-base-cla... | trusted_official_docs | CPython Docs | Encodes *obj* using the codec registered for *encoding*.
*Errors* may be given to set the desired error handling scheme. The
default error handler is ``'strict'`` meaning that encoding errors raise
:exc:`ValueError` (or a more codec specific subclass, such as
:exc:`UnicodeEncodeError`). Refer to :ref:`codec-base-cla... | Encodes *obj* using the codec registered for *encoding*.
*Errors* may be given to set the desired error handling scheme. The
default error handler is ``'strict'`` meaning that encoding errors raise
:exc:`ValueError` (or a more codec specific subclass, such as
:exc:`UnicodeEncodeError`). Refer to :ref:`codec-base-cla... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e28288fe-f8a7-4734-bb6d-f14ef843114e | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,274 | supabase-export-v2 | 70ba6d9bd046ce61 | .. function:: iterdecode(iterator, encoding, errors='strict', **kwargs)
Uses an incremental decoder to iteratively decode the input provided by
*iterator*. *iterator* must yield :class:`bytes` objects. This function is a :term:`generator`. The *errors* argument (as well as any
other keyword argument) is passed throug... | trusted_official_docs | CPython Docs | .. function:: iterdecode(iterator, encoding, errors='strict', **kwargs)
Uses an incremental decoder to iteratively decode the input provided by
*iterator*. *iterator* must yield :class:`bytes` objects. This function is a :term:`generator`. The *errors* argument (as well as any
other keyword argument) is passed throug... | .. function:: iterdecode(iterator, encoding, errors='strict', **kwargs)
Uses an incremental decoder to iteratively decode the input provided by
*iterator*. *iterator* must yield :class:`bytes` objects. This function is a :term:`generator`. The *errors* argument (as well as any
other keyword argument) is passed throug... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e40f5df9-7a37-45f7-8d6e-db1dbbbe076f | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,488 | supabase-export-v2 | 96459356bcfa0e0a | +-----------------+--------------------------------+--------------------------------+ | koi8_u | | Ukrainian | +-----------------+--------------------------------+--------------------------------+ | kz1048 | kz_1048, strk1048_2002, rk1048 | Kazakh | | | | | | | | ..
versionadded:: 3.5 |
+-----------------+-------------... | trusted_official_docs | CPython Docs | +-----------------+--------------------------------+--------------------------------+ | koi8_u | | Ukrainian | +-----------------+--------------------------------+--------------------------------+ | kz1048 | kz_1048, strk1048_2002, rk1048 | Kazakh | | | | | | | | ..
versionadded:: 3.5 |
+-----------------+-------------... | +-----------------+--------------------------------+--------------------------------+ | koi8_u | | Ukrainian | +-----------------+--------------------------------+--------------------------------+ | kz1048 | kz_1048, strk1048_2002, rk1048 | Kazakh | | | | | | | | ..
versionadded:: 3.5 |
+-----------------+-------------... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e4cf50a2-3d82-4935-8444-975e50355301 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,460 | supabase-export-v2 | 3952fb1876a6891e | in a Unicode text. When the first character of a ``UTF-16`` or ``UTF-32`` byte sequence is ``U+FFFE``, the bytes have to be swapped on decoding.
Unfortunately the character ``U+FEFF`` had a second purpose as
a ``ZERO WIDTH NO-BREAK SPACE``: a character that has no width and doesn't allow
a word to be split. It can e.g.... | trusted_official_docs | CPython Docs | in a Unicode text. When the first character of a ``UTF-16`` or ``UTF-32`` byte sequence is ``U+FFFE``, the bytes have to be swapped on decoding.
Unfortunately the character ``U+FEFF`` had a second purpose as
a ``ZERO WIDTH NO-BREAK SPACE``: a character that has no width and doesn't allow
a word to be split. It can e.g.... | in a Unicode text. When the first character of a ``UTF-16`` or ``UTF-32`` byte sequence is ``U+FFFE``, the bytes have to be swapped on decoding.
Unfortunately the character ``U+FEFF`` had a second purpose as
a ``ZERO WIDTH NO-BREAK SPACE``: a character that has no width and doesn't allow
a word to be split. It can e.g.... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e5a67809-0de5-4be7-92b1-f4a88e3a1728 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,346 | supabase-export-v2 | 0197e3d7f97807e5 | The method may not store state in the :class:`Codec` instance. Use :class:`StreamWriter` for codecs which have to keep state in order to make encoding efficient.
The encoder must be able to handle zero length input and return an empty object
of the output object type in this situation. | trusted_official_docs | CPython Docs | The method may not store state in the :class:`Codec` instance. Use :class:`StreamWriter` for codecs which have to keep state in order to make encoding efficient.
The encoder must be able to handle zero length input and return an empty object
of the output object type in this situation. | The method may not store state in the :class:`Codec` instance. Use :class:`StreamWriter` for codecs which have to keep state in order to make encoding efficient.
The encoder must be able to handle zero length input and return an empty object
of the output object type in this situation. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e94dc33f-33fa-424b-8ac4-f66435b7addf | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,416 | supabase-export-v2 | 95bd1b5dcda0defd | of the same name. Assigning to this attribute makes it possible to switch between different error handling strategies during the lifetime of the :class:`StreamReader` object.
The set of allowed values for the *errors* argument can be extended with
:func:`register_error`. | trusted_official_docs | CPython Docs | of the same name. Assigning to this attribute makes it possible to switch between different error handling strategies during the lifetime of the :class:`StreamReader` object.
The set of allowed values for the *errors* argument can be extended with
:func:`register_error`. | of the same name. Assigning to this attribute makes it possible to switch between different error handling strategies during the lifetime of the :class:`StreamReader` object.
The set of allowed values for the *errors* argument can be extended with
:func:`register_error`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e9937b2b-49ed-474f-916f-c5da41420fb1 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,226 | supabase-export-v2 | 197bbc3fd3a23f10 | .. attribute:: incrementalencoder incrementaldecoder
Incremental encoder and decoder classes or factory functions. These have to provide the interface defined by the base classes
:class:`IncrementalEncoder` and :class:`IncrementalDecoder`,
respectively. Incremental codecs can maintain state. | trusted_official_docs | CPython Docs | .. attribute:: incrementalencoder incrementaldecoder
Incremental encoder and decoder classes or factory functions. These have to provide the interface defined by the base classes
:class:`IncrementalEncoder` and :class:`IncrementalDecoder`,
respectively. Incremental codecs can maintain state. | .. attribute:: incrementalencoder incrementaldecoder
Incremental encoder and decoder classes or factory functions. These have to provide the interface defined by the base classes
:class:`IncrementalEncoder` and :class:`IncrementalDecoder`,
respectively. Incremental codecs can maintain state. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
eb6a672b-cbd7-4ac0-9034-58670d17bc1e | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,262 | supabase-export-v2 | e86dcb803b00640d | *buffering* has the same meaning as for the built-in :func:`open` function. It defaults to -1 which means that the default buffer size will be used.
.. versionchanged:: 3.11
The ``'U'`` mode has been removed. | trusted_official_docs | CPython Docs | *buffering* has the same meaning as for the built-in :func:`open` function. It defaults to -1 which means that the default buffer size will be used.
.. versionchanged:: 3.11
The ``'U'`` mode has been removed. | *buffering* has the same meaning as for the built-in :func:`open` function. It defaults to -1 which means that the default buffer size will be used.
.. versionchanged:: 3.11
The ``'U'`` mode has been removed. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f0f9f5f8-682a-4d4b-b338-e0d2c268f80b | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,374 | supabase-export-v2 | c6bf5571a3ee29f5 | IncrementalDecoder Objects ~~~~~~~~~~~~~~~~~~~~~~~~~~
The :class:`IncrementalDecoder` class is used for decoding an input in multiple
steps. It defines the following methods which every incremental decoder must
define in order to be compatible with the Python codec registry. | trusted_official_docs | CPython Docs | IncrementalDecoder Objects ~~~~~~~~~~~~~~~~~~~~~~~~~~
The :class:`IncrementalDecoder` class is used for decoding an input in multiple
steps. It defines the following methods which every incremental decoder must
define in order to be compatible with the Python codec registry. | IncrementalDecoder Objects ~~~~~~~~~~~~~~~~~~~~~~~~~~
The :class:`IncrementalDecoder` class is used for decoding an input in multiple
steps. It defines the following methods which every incremental decoder must
define in order to be compatible with the Python codec registry. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f1553968-8bd2-4b99-83bd-8abdc2cbdb4a | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,462 | supabase-export-v2 | 5e90336fe1454161 | ``1`` bits followed by a ``0`` bit. Unicode characters are encoded like this (with x being payload bits, which when concatenated give the Unicode character):
+-----------------------------------+----------------------------------------------+
| Range | Encoding |
+===================================+===================... | trusted_official_docs | CPython Docs | ``1`` bits followed by a ``0`` bit. Unicode characters are encoded like this (with x being payload bits, which when concatenated give the Unicode character):
+-----------------------------------+----------------------------------------------+
| Range | Encoding |
+===================================+===================... | ``1`` bits followed by a ``0`` bit. Unicode characters are encoded like this (with x being payload bits, which when concatenated give the Unicode character):
+-----------------------------------+----------------------------------------------+
| Range | Encoding |
+===================================+===================... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f1593836-312c-4d26-9db8-7f8bb50259e1 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,448 | supabase-export-v2 | 1c9be39af5876ea2 | the frontend — the data visible to code calling :meth:`~StreamReader.read` and :meth:`~StreamWriter.write`, while *Reader* and *Writer* work on the backend — the data in *stream*.
You can use these objects to do transparent transcodings, e.g., from Latin-1
to UTF-8 and back. | trusted_official_docs | CPython Docs | the frontend — the data visible to code calling :meth:`~StreamReader.read` and :meth:`~StreamWriter.write`, while *Reader* and *Writer* work on the backend — the data in *stream*.
You can use these objects to do transparent transcodings, e.g., from Latin-1
to UTF-8 and back. | the frontend — the data visible to code calling :meth:`~StreamReader.read` and :meth:`~StreamWriter.write`, while *Reader* and *Writer* work on the backend — the data in *stream*.
You can use these objects to do transparent transcodings, e.g., from Latin-1
to UTF-8 and back. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f1a53401-6193-40e1-a532-917826604c41 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,261 | supabase-export-v2 | 1a38b7072d0abe9a | may be given to define the error handling. It defaults to ``'strict'`` which causes a :exc:`ValueError` to be raised in case an encoding error occurs.
*buffering* has the same meaning as for the built-in :func:`open` function. It defaults to -1 which means that the default buffer size will be used. | trusted_official_docs | CPython Docs | may be given to define the error handling. It defaults to ``'strict'`` which causes a :exc:`ValueError` to be raised in case an encoding error occurs.
*buffering* has the same meaning as for the built-in :func:`open` function. It defaults to -1 which means that the default buffer size will be used. | may be given to define the error handling. It defaults to ``'strict'`` which causes a :exc:`ValueError` to be raised in case an encoding error occurs.
*buffering* has the same meaning as for the built-in :func:`open` function. It defaults to -1 which means that the default buffer size will be used. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f327eeda-9fd2-46f2-a7e1-d08a3e6daa46 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,440 | supabase-export-v2 | c7a915713540ea4f | .. class:: StreamReaderWriter(stream, Reader, Writer, errors='strict')
Creates a :class:`StreamReaderWriter` instance. *stream* must be a file-like
object. *Reader* and *Writer* must be factory functions or classes providing the
:class:`StreamReader` and :class:`StreamWriter` interface resp. Error handling
is done i... | trusted_official_docs | CPython Docs | .. class:: StreamReaderWriter(stream, Reader, Writer, errors='strict')
Creates a :class:`StreamReaderWriter` instance. *stream* must be a file-like
object. *Reader* and *Writer* must be factory functions or classes providing the
:class:`StreamReader` and :class:`StreamWriter` interface resp. Error handling
is done i... | .. class:: StreamReaderWriter(stream, Reader, Writer, errors='strict')
Creates a :class:`StreamReaderWriter` instance. *stream* must be a file-like
object. *Reader* and *Writer* must be factory functions or classes providing the
:class:`StreamReader` and :class:`StreamWriter` interface resp. Error handling
is done i... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f445259a-2602-4702-b2ba-d3eb449171d4 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,389 | supabase-export-v2 | e261459e8fd4e32c | Stream Encoding and Decoding ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The :class:`StreamWriter` and :class:`StreamReader` classes provide generic
working interfaces which can be used to implement new encoding submodules very
easily. See :mod:`!encodings.utf_8` for an example of how this is done. | trusted_official_docs | CPython Docs | Stream Encoding and Decoding ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The :class:`StreamWriter` and :class:`StreamReader` classes provide generic
working interfaces which can be used to implement new encoding submodules very
easily. See :mod:`!encodings.utf_8` for an example of how this is done. | Stream Encoding and Decoding ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The :class:`StreamWriter` and :class:`StreamReader` classes provide generic
working interfaces which can be used to implement new encoding submodules very
easily. See :mod:`!encodings.utf_8` for an example of how this is done. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f55d05be-1025-4069-840d-fe5a880a6421 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,381 | supabase-export-v2 | 690935425673003e | .. method:: decode(object, final=False)
Decodes *object* (taking the current state of the decoder into account)
and returns the resulting decoded object. If this is the last call to
:meth:`decode` *final* must be true (the default is false). If *final* is
true the decoder must decode the input completely and must fl... | trusted_official_docs | CPython Docs | .. method:: decode(object, final=False)
Decodes *object* (taking the current state of the decoder into account)
and returns the resulting decoded object. If this is the last call to
:meth:`decode` *final* must be true (the default is false). If *final* is
true the decoder must decode the input completely and must fl... | .. method:: decode(object, final=False)
Decodes *object* (taking the current state of the decoder into account)
and returns the resulting decoded object. If this is the last call to
:meth:`decode` *final* must be true (the default is false). If *final* is
true the decoder must decode the input completely and must fl... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f5b9d4af-c8cf-477f-bd1a-1b183d8e9877 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,412 | supabase-export-v2 | c75575bd5df4a83a | Constructor for a :class:`StreamReader` instance.
All stream readers must provide this constructor interface. They are free to add
additional keyword arguments, but only the ones defined here are used by the
Python codec registry. | trusted_official_docs | CPython Docs | Constructor for a :class:`StreamReader` instance.
All stream readers must provide this constructor interface. They are free to add
additional keyword arguments, but only the ones defined here are used by the
Python codec registry. | Constructor for a :class:`StreamReader` instance.
All stream readers must provide this constructor interface. They are free to add
additional keyword arguments, but only the ones defined here are used by the
Python codec registry. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f85bd33f-9550-4416-b993-d6c7867e3e7e | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,292 | supabase-export-v2 | cbde05c7be0fb1ef | >>> 'German ß, ♬'.encode(encoding='ascii', errors='backslashreplace') b'German \\xdf, \\u266c' >>> 'German ß, ♬'.encode(encoding='ascii', errors='xmlcharrefreplace') b'German ß, ♬'
.. index::
pair: strict; error handler's name
pair: ignore; error handler's name
pair: replace; error handler's name
pair: b... | trusted_official_docs | CPython Docs | >>> 'German ß, ♬'.encode(encoding='ascii', errors='backslashreplace') b'German \\xdf, \\u266c' >>> 'German ß, ♬'.encode(encoding='ascii', errors='xmlcharrefreplace') b'German ß, ♬'
.. index::
pair: strict; error handler's name
pair: ignore; error handler's name
pair: replace; error handler's name
pair: b... | >>> 'German ß, ♬'.encode(encoding='ascii', errors='backslashreplace') b'German \\xdf, \\u266c' >>> 'German ß, ♬'.encode(encoding='ascii', errors='xmlcharrefreplace') b'German ß, ♬'
.. index::
pair: strict; error handler's name
pair: ignore; error handler's name
pair: replace; error handler's name
pair: b... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f8b7adec-4084-4513-bed9-90d4f3baf008 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,438 | supabase-export-v2 | 46b0e468921b6b1b | The :class:`StreamReaderWriter` is a convenience class that allows wrapping streams which work in both read and write modes.
The design is such that one can use the factory functions returned by the
:func:`lookup` function to construct the instance. | trusted_official_docs | CPython Docs | The :class:`StreamReaderWriter` is a convenience class that allows wrapping streams which work in both read and write modes.
The design is such that one can use the factory functions returned by the
:func:`lookup` function to construct the instance. | The :class:`StreamReaderWriter` is a convenience class that allows wrapping streams which work in both read and write modes.
The design is such that one can use the factory functions returned by the
:func:`lookup` function to construct the instance. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fa46f877-1b0c-476c-9fdf-afafe8d8ee7d | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,405 | supabase-export-v2 | dfaf8d877a273ca8 | Resets the codec buffers used for keeping internal state.
Calling this method should ensure that the data on the output is put into
a clean state that allows appending of new fresh data without having to
rescan the whole stream to recover state. | trusted_official_docs | CPython Docs | Resets the codec buffers used for keeping internal state.
Calling this method should ensure that the data on the output is put into
a clean state that allows appending of new fresh data without having to
rescan the whole stream to recover state. | Resets the codec buffers used for keeping internal state.
Calling this method should ensure that the data on the output is put into
a clean state that allows appending of new fresh data without having to
rescan the whole stream to recover state. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fbf18104-f949-466c-8f02-e2224e5cbbe2 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,334 | supabase-export-v2 | 14fd40bae46eff00 | Implements the ``'xmlcharrefreplace'`` error handling (for encoding within :term:`text encoding` only).
The unencodable character is replaced by an appropriate XML/HTML numeric
character reference, which is a decimal form of Unicode code point with
format :samp:`&#{num};` . | trusted_official_docs | CPython Docs | Implements the ``'xmlcharrefreplace'`` error handling (for encoding within :term:`text encoding` only).
The unencodable character is replaced by an appropriate XML/HTML numeric
character reference, which is a decimal form of Unicode code point with
format :samp:`&#{num};` . | Implements the ``'xmlcharrefreplace'`` error handling (for encoding within :term:`text encoding` only).
The unencodable character is replaced by an appropriate XML/HTML numeric
character reference, which is a decimal form of Unicode code point with
format :samp:`&#{num};` . | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fbff4f1d-3cc3-4d88-9c0d-b6139625fb6d | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,409 | supabase-export-v2 | 7caa526d143e0125 | StreamReader Objects ~~~~~~~~~~~~~~~~~~~~
The :class:`StreamReader` class is a subclass of :class:`Codec` and defines the
following methods which every stream reader must define in order to be
compatible with the Python codec registry. | trusted_official_docs | CPython Docs | StreamReader Objects ~~~~~~~~~~~~~~~~~~~~
The :class:`StreamReader` class is a subclass of :class:`Codec` and defines the
following methods which every stream reader must define in order to be
compatible with the Python codec registry. | StreamReader Objects ~~~~~~~~~~~~~~~~~~~~
The :class:`StreamReader` class is a subclass of :class:`Codec` and defines the
following methods which every stream reader must define in order to be
compatible with the Python codec registry. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fc6fd814-1972-47b1-9475-60849b1df848 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,377 | supabase-export-v2 | 4e55d0d10903115c | Constructor for an :class:`IncrementalDecoder` instance.
All incremental decoders must provide this constructor interface. They are free
to add additional keyword arguments, but only the ones defined here are used by
the Python codec registry. | trusted_official_docs | CPython Docs | Constructor for an :class:`IncrementalDecoder` instance.
All incremental decoders must provide this constructor interface. They are free
to add additional keyword arguments, but only the ones defined here are used by
the Python codec registry. | Constructor for an :class:`IncrementalDecoder` instance.
All incremental decoders must provide this constructor interface. They are free
to add additional keyword arguments, but only the ones defined here are used by
the Python codec registry. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fdb9fc30-b8ad-49e9-a9ba-091f1186fdc0 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,205 | supabase-export-v2 | 2b24c07a64f9caf4 | between arbitrary types, but some module features are restricted to be used specifically with :term:`text encodings <text encoding>` or with codecs that encode to :class:`bytes`.
The module defines the following functions for encoding and decoding with
any codec: | trusted_official_docs | CPython Docs | between arbitrary types, but some module features are restricted to be used specifically with :term:`text encodings <text encoding>` or with codecs that encode to :class:`bytes`.
The module defines the following functions for encoding and decoding with
any codec: | between arbitrary types, but some module features are restricted to be used specifically with :term:`text encodings <text encoding>` or with codecs that encode to :class:`bytes`.
The module defines the following functions for encoding and decoding with
any codec: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fdf498ac-11d2-4e5a-8a34-fafe81a7aa48 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,479 | supabase-export-v2 | 5725242c2b265df9 | SIGN is supported or not), and in the assignment of characters to code positions. For the European languages in particular, the following variants typically exist:
* an ISO 8859 codeset | trusted_official_docs | CPython Docs | SIGN is supported or not), and in the assignment of characters to code positions. For the European languages in particular, the following variants typically exist:
* an ISO 8859 codeset | SIGN is supported or not), and in the assignment of characters to code positions. For the European languages in particular, the following variants typically exist:
* an ISO 8859 codeset | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ff66139c-6778-4dc3-a3e2-ffeb8e574ddd | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,330 | supabase-export-v2 | ef4b19803079155b | Implements the ``'backslashreplace'`` error handling.
Malformed data is replaced by a backslashed escape sequence. On encoding, use the hexadecimal form of Unicode code point with formats
:samp:`\\x{hh}` :samp:`\\u{xxxx}` :samp:`\\U{xxxxxxxx}`. On decoding, use the hexadecimal form of
byte value with format :samp:`\\... | trusted_official_docs | CPython Docs | Implements the ``'backslashreplace'`` error handling.
Malformed data is replaced by a backslashed escape sequence. On encoding, use the hexadecimal form of Unicode code point with formats
:samp:`\\x{hh}` :samp:`\\u{xxxx}` :samp:`\\U{xxxxxxxx}`. On decoding, use the hexadecimal form of
byte value with format :samp:`\\... | Implements the ``'backslashreplace'`` error handling.
Malformed data is replaced by a backslashed escape sequence. On encoding, use the hexadecimal form of Unicode code point with formats
:samp:`\\x{hh}` :samp:`\\u{xxxx}` :samp:`\\U{xxxxxxxx}`. On decoding, use the hexadecimal form of
byte value with format :samp:`\\... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
06c8a686-de20-4278-b15d-ac61bd9c3d37 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-stream.rst | unknown | cfd3d5b2-49a3-46d9-8c22-0f8865cab2d7 | 20,589 | supabase-export-v2 | 1dabdbda9294a9fa | The following top-level asyncio functions can be used to create and work with streams:
.. function:: open_connection(host=None, port=None, *, \
limit=None, ssl=None, family=0, proto=0, \
flags=0, sock=None, local_addr=None, \
server_hostname=None, ssl_handshake_timeout=None, \
ssl_shutdown_timeout=None, \
happy_ey... | trusted_official_docs | CPython Docs | The following top-level asyncio functions can be used to create and work with streams:
.. function:: open_connection(host=None, port=None, *, \
limit=None, ssl=None, family=0, proto=0, \
flags=0, sock=None, local_addr=None, \
server_hostname=None, ssl_handshake_timeout=None, \
ssl_shutdown_timeout=None, \
happy_ey... | The following top-level asyncio functions can be used to create and work with streams:
.. function:: open_connection(host=None, port=None, *, \
limit=None, ssl=None, family=0, proto=0, \
flags=0, sock=None, local_addr=None, \
server_hostname=None, ssl_handshake_timeout=None, \
ssl_shutdown_timeout=None, \
happy_ey... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0ebdbb20-67a9-4eb7-abab-91f90a17ffd9 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-stream.rst | unknown | cfd3d5b2-49a3-46d9-8c22-0f8865cab2d7 | 20,666 | supabase-export-v2 | 0c17404767b32f6d | write the *data* to the underlying socket immediately. If that fails, the data is queued in an internal write buffer until it can be sent.
The *data* buffer should be a bytes, bytearray, or C-contiguous one-dimensional
memoryview object. | trusted_official_docs | CPython Docs | write the *data* to the underlying socket immediately. If that fails, the data is queued in an internal write buffer until it can be sent.
The *data* buffer should be a bytes, bytearray, or C-contiguous one-dimensional
memoryview object. | write the *data* to the underlying socket immediately. If that fails, the data is queued in an internal write buffer until it can be sent.
The *data* buffer should be a bytes, bytearray, or C-contiguous one-dimensional
memoryview object. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
19bb867c-2da2-4536-acd5-c7ac7111afff | CPython Docs | file://datasets/cpython/Doc/library/asyncio-stream.rst | unknown | cfd3d5b2-49a3-46d9-8c22-0f8865cab2d7 | 20,643 | supabase-export-v2 | 23ed4975c236bf33 | If *n* is ``0``, return an empty ``bytes`` object immediately.
If *n* is positive, return at most *n* available ``bytes``
as soon as at least 1 byte is available in the internal buffer. If EOF is received before any byte is read, return an empty
``bytes`` object. | trusted_official_docs | CPython Docs | If *n* is ``0``, return an empty ``bytes`` object immediately.
If *n* is positive, return at most *n* available ``bytes``
as soon as at least 1 byte is available in the internal buffer. If EOF is received before any byte is read, return an empty
``bytes`` object. | If *n* is ``0``, return an empty ``bytes`` object immediately.
If *n* is positive, return at most *n* available ``bytes``
as soon as at least 1 byte is available in the internal buffer. If EOF is received before any byte is read, return an empty
``bytes`` object. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1b5a3169-14df-4a19-a05d-d84838521d6f | CPython Docs | file://datasets/cpython/Doc/library/asyncio-stream.rst | unknown | cfd3d5b2-49a3-46d9-8c22-0f8865cab2d7 | 20,642 | supabase-export-v2 | 29a534bd0bf5609b | to ``-1``, read until EOF, then return all read :class:`bytes`. If EOF was received and the internal buffer is empty, return an empty ``bytes`` object.
If *n* is ``0``, return an empty ``bytes`` object immediately. | trusted_official_docs | CPython Docs | to ``-1``, read until EOF, then return all read :class:`bytes`. If EOF was received and the internal buffer is empty, return an empty ``bytes`` object.
If *n* is ``0``, return an empty ``bytes`` object immediately. | to ``-1``, read until EOF, then return all read :class:`bytes`. If EOF was received and the internal buffer is empty, return an empty ``bytes`` object.
If *n* is ``0``, return an empty ``bytes`` object immediately. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
224ba44e-33ac-49a7-b5af-cfbe6b978629 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-stream.rst | unknown | cfd3d5b2-49a3-46d9-8c22-0f8865cab2d7 | 20,670 | supabase-export-v2 | 44e547ec8bae75c6 | .. method:: writelines(data)
The method writes a list (or any iterable) of bytes to the underlying socket
immediately. If that fails, the data is queued in an internal write buffer until it can be
sent. | trusted_official_docs | CPython Docs | .. method:: writelines(data)
The method writes a list (or any iterable) of bytes to the underlying socket
immediately. If that fails, the data is queued in an internal write buffer until it can be
sent. | .. method:: writelines(data)
The method writes a list (or any iterable) of bytes to the underlying socket
immediately. If that fails, the data is queued in an internal write buffer until it can be
sent. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
30ba4205-c51a-4efe-aa08-2d93f6a9d65f | CPython Docs | file://datasets/cpython/Doc/library/asyncio-stream.rst | unknown | cfd3d5b2-49a3-46d9-8c22-0f8865cab2d7 | 20,641 | supabase-export-v2 | 165e7a9b9e768eed | Read up to *n* bytes from the stream.
If *n* is not provided or set to ``-1``,
read until EOF, then return all read :class:`bytes`. If EOF was received and the internal buffer is empty,
return an empty ``bytes`` object. | trusted_official_docs | CPython Docs | Read up to *n* bytes from the stream.
If *n* is not provided or set to ``-1``,
read until EOF, then return all read :class:`bytes`. If EOF was received and the internal buffer is empty,
return an empty ``bytes`` object. | Read up to *n* bytes from the stream.
If *n* is not provided or set to ``-1``,
read until EOF, then return all read :class:`bytes`. If EOF was received and the internal buffer is empty,
return an empty ``bytes`` object. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
30ea517b-2293-4d93-8fae-4ade115706ef | CPython Docs | file://datasets/cpython/Doc/library/asyncio-stream.rst | unknown | cfd3d5b2-49a3-46d9-8c22-0f8865cab2d7 | 20,703 | supabase-export-v2 | d4fb2fb105f2b9e6 | Wait until the stream is closed.
Should be called after :meth:`close` to wait until the underlying
connection is closed, ensuring that all data has been flushed
before e.g. exiting the program. | trusted_official_docs | CPython Docs | Wait until the stream is closed.
Should be called after :meth:`close` to wait until the underlying
connection is closed, ensuring that all data has been flushed
before e.g. exiting the program. | Wait until the stream is closed.
Should be called after :meth:`close` to wait until the underlying
connection is closed, ensuring that all data has been flushed
before e.g. exiting the program. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3c518558-4820-404c-93a9-b17c5bd3bf3e | CPython Docs | file://datasets/cpython/Doc/library/asyncio-stream.rst | unknown | cfd3d5b2-49a3-46d9-8c22-0f8865cab2d7 | 20,688 | supabase-export-v2 | 1c195efd8e276015 | writer.write(data) await writer.drain()
This is a flow control method that interacts with the underlying
IO write buffer. When the size of the buffer reaches
the high watermark, *drain()* blocks until the size of the
buffer is drained down to the low watermark and writing can
be resumed. When there is nothing to wa... | trusted_official_docs | CPython Docs | writer.write(data) await writer.drain()
This is a flow control method that interacts with the underlying
IO write buffer. When the size of the buffer reaches
the high watermark, *drain()* blocks until the size of the
buffer is drained down to the low watermark and writing can
be resumed. When there is nothing to wa... | writer.write(data) await writer.drain()
This is a flow control method that interacts with the underlying
IO write buffer. When the size of the buffer reaches
the high watermark, *drain()* blocks until the size of the
buffer is drained down to the low watermark and writing can
be resumed. When there is nothing to wa... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
41fc3ce6-f912-4504-a04b-c13205b2ec71 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-stream.rst | unknown | cfd3d5b2-49a3-46d9-8c22-0f8865cab2d7 | 20,755 | supabase-export-v2 | 3c128abe6629f403 | The :ref:`register an open socket to wait for data using a protocol <asyncio_example_create_connection>` example uses a low-level protocol and the :meth:`loop.create_connection` method.
The :ref:`watch a file descriptor for read events
<asyncio_example_watch_fd>` example uses the low-level
:meth:`loop.add_reader` met... | trusted_official_docs | CPython Docs | The :ref:`register an open socket to wait for data using a protocol <asyncio_example_create_connection>` example uses a low-level protocol and the :meth:`loop.create_connection` method.
The :ref:`watch a file descriptor for read events
<asyncio_example_watch_fd>` example uses the low-level
:meth:`loop.add_reader` met... | The :ref:`register an open socket to wait for data using a protocol <asyncio_example_create_connection>` example uses a low-level protocol and the :meth:`loop.create_connection` method.
The :ref:`watch a file descriptor for read events
<asyncio_example_watch_fd>` example uses the low-level
:meth:`loop.add_reader` met... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4f3f88e2-60e7-4007-b687-0c71c8db629a | CPython Docs | file://datasets/cpython/Doc/library/asyncio-stream.rst | unknown | cfd3d5b2-49a3-46d9-8c22-0f8865cab2d7 | 20,656 | supabase-export-v2 | 9ec1be56d5182512 | complete separator is found, an :exc:`IncompleteReadError` exception is raised, and the internal buffer is reset. The :attr:`IncompleteReadError.partial` attribute may contain a portion of the separator.
The *separator* may also be a tuple of separators. In this
case the return value will be the shortest possible that... | trusted_official_docs | CPython Docs | complete separator is found, an :exc:`IncompleteReadError` exception is raised, and the internal buffer is reset. The :attr:`IncompleteReadError.partial` attribute may contain a portion of the separator.
The *separator* may also be a tuple of separators. In this
case the return value will be the shortest possible that... | complete separator is found, an :exc:`IncompleteReadError` exception is raised, and the internal buffer is reset. The :attr:`IncompleteReadError.partial` attribute may contain a portion of the separator.
The *separator* may also be a tuple of separators. In this
case the return value will be the shortest possible that... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
50eb53ac-509a-4733-88b1-4fcbfe990d1c | CPython Docs | file://datasets/cpython/Doc/library/asyncio-stream.rst | unknown | cfd3d5b2-49a3-46d9-8c22-0f8865cab2d7 | 20,647 | supabase-export-v2 | e0f9cac55d7c3d11 | If EOF is received and ``\n`` was not found, the method returns partially read data.
If EOF is received and the internal buffer is empty,
return an empty ``bytes`` object. | trusted_official_docs | CPython Docs | If EOF is received and ``\n`` was not found, the method returns partially read data.
If EOF is received and the internal buffer is empty,
return an empty ``bytes`` object. | If EOF is received and ``\n`` was not found, the method returns partially read data.
If EOF is received and the internal buffer is empty,
return an empty ``bytes`` object. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
61184a34-14de-4991-b74d-2d298e35b788 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-stream.rst | unknown | cfd3d5b2-49a3-46d9-8c22-0f8865cab2d7 | 20,654 | supabase-export-v2 | a3a0621a529fb41d | On success, the data and separator will be removed from the internal buffer (consumed). Returned data will include the separator at the end.
If the amount of data read exceeds the configured stream limit, a
:exc:`LimitOverrunError` exception is raised, and the data
is left in the internal buffer and can be read again... | trusted_official_docs | CPython Docs | On success, the data and separator will be removed from the internal buffer (consumed). Returned data will include the separator at the end.
If the amount of data read exceeds the configured stream limit, a
:exc:`LimitOverrunError` exception is raised, and the data
is left in the internal buffer and can be read again... | On success, the data and separator will be removed from the internal buffer (consumed). Returned data will include the separator at the end.
If the amount of data read exceeds the configured stream limit, a
:exc:`LimitOverrunError` exception is raised, and the data
is left in the internal buffer and can be read again... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
619ea9e9-7a3d-4c54-b00c-5fd6a72ed804 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-stream.rst | unknown | cfd3d5b2-49a3-46d9-8c22-0f8865cab2d7 | 20,653 | supabase-export-v2 | f0fb9c0a4ed948bb | Read data from the stream until *separator* is found.
On success, the data and separator will be removed from the
internal buffer (consumed). Returned data will include the
separator at the end. | trusted_official_docs | CPython Docs | Read data from the stream until *separator* is found.
On success, the data and separator will be removed from the
internal buffer (consumed). Returned data will include the
separator at the end. | Read data from the stream until *separator* is found.
On success, the data and separator will be removed from the
internal buffer (consumed). Returned data will include the
separator at the end. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
6bbf5755-0b7d-483b-b40c-990dbbb12611 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-stream.rst | unknown | cfd3d5b2-49a3-46d9-8c22-0f8865cab2d7 | 20,593 | supabase-export-v2 | 4035eba1449c16cf | *limit* determines the buffer size limit used by the returned :class:`StreamReader` instance. By default the *limit* is set to 64 KiB.
The rest of the arguments are passed directly to
:meth:`loop.create_connection`. | trusted_official_docs | CPython Docs | *limit* determines the buffer size limit used by the returned :class:`StreamReader` instance. By default the *limit* is set to 64 KiB.
The rest of the arguments are passed directly to
:meth:`loop.create_connection`. | *limit* determines the buffer size limit used by the returned :class:`StreamReader` instance. By default the *limit* is set to 64 KiB.
The rest of the arguments are passed directly to
:meth:`loop.create_connection`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
70660db0-28e7-43e3-8764-c15c40621c57 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-stream.rst | unknown | cfd3d5b2-49a3-46d9-8c22-0f8865cab2d7 | 20,637 | supabase-export-v2 | 2d09f21944bad1b5 | Represents a reader object that provides APIs to read data from the IO stream. As an :term:`asynchronous iterable`, the object supports the :keyword:`async for` statement.
It is not recommended to instantiate *StreamReader* objects
directly; use :func:`open_connection` and :func:`start_server`
instead. | trusted_official_docs | CPython Docs | Represents a reader object that provides APIs to read data from the IO stream. As an :term:`asynchronous iterable`, the object supports the :keyword:`async for` statement.
It is not recommended to instantiate *StreamReader* objects
directly; use :func:`open_connection` and :func:`start_server`
instead. | Represents a reader object that provides APIs to read data from the IO stream. As an :term:`asynchronous iterable`, the object supports the :keyword:`async for` statement.
It is not recommended to instantiate *StreamReader* objects
directly; use :func:`open_connection` and :func:`start_server`
instead. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7200fd48-71d7-4ab7-b699-062ce3945a3e | CPython Docs | file://datasets/cpython/Doc/library/asyncio-stream.rst | unknown | cfd3d5b2-49a3-46d9-8c22-0f8865cab2d7 | 20,655 | supabase-export-v2 | 46e9c684f4e6e86c | read exceeds the configured stream limit, a :exc:`LimitOverrunError` exception is raised, and the data is left in the internal buffer and can be read again.
If EOF is reached before the complete separator is found,
an :exc:`IncompleteReadError` exception is raised, and the internal
buffer is reset. The :attr:`Incompl... | trusted_official_docs | CPython Docs | read exceeds the configured stream limit, a :exc:`LimitOverrunError` exception is raised, and the data is left in the internal buffer and can be read again.
If EOF is reached before the complete separator is found,
an :exc:`IncompleteReadError` exception is raised, and the internal
buffer is reset. The :attr:`Incompl... | read exceeds the configured stream limit, a :exc:`LimitOverrunError` exception is raised, and the data is left in the internal buffer and can be read again.
If EOF is reached before the complete separator is found,
an :exc:`IncompleteReadError` exception is raised, and the internal
buffer is reset. The :attr:`Incompl... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7e6fbb6a-52fe-48f5-abd4-63a66aa11c56 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-stream.rst | unknown | cfd3d5b2-49a3-46d9-8c22-0f8865cab2d7 | 20,732 | supabase-export-v2 | 209722f747a30992 | import asyncio import urllib.parse import sys
async def print_http_headers(url):
url = urllib.parse.urlsplit(url)
if url.scheme == 'https':
reader, writer = await asyncio.open_connection(
url.hostname, 443, ssl=True)
else:
reader, writer = await asyncio.open_connection(
url.hostname, 80) | trusted_official_docs | CPython Docs | import asyncio import urllib.parse import sys
async def print_http_headers(url):
url = urllib.parse.urlsplit(url)
if url.scheme == 'https':
reader, writer = await asyncio.open_connection(
url.hostname, 443, ssl=True)
else:
reader, writer = await asyncio.open_connection(
url.hostname, 80) | import asyncio import urllib.parse import sys
async def print_http_headers(url):
url = urllib.parse.urlsplit(url)
if url.scheme == 'https':
reader, writer = await asyncio.open_connection(
url.hostname, 443, ssl=True)
else:
reader, writer = await asyncio.open_connection(
url.hostname, 80) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7ee9b671-5a6d-458d-ae0a-9422c64c477f | CPython Docs | file://datasets/cpython/Doc/library/asyncio-stream.rst | unknown | cfd3d5b2-49a3-46d9-8c22-0f8865cab2d7 | 20,665 | supabase-export-v2 | acbecd04d9df5fe5 | .. method:: write(data)
The method attempts to write the *data* to the underlying socket immediately. If that fails, the data is queued in an internal write buffer until it can be
sent. | trusted_official_docs | CPython Docs | .. method:: write(data)
The method attempts to write the *data* to the underlying socket immediately. If that fails, the data is queued in an internal write buffer until it can be
sent. | .. method:: write(data)
The method attempts to write the *data* to the underlying socket immediately. If that fails, the data is queued in an internal write buffer until it can be
sent. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8f69d1da-55c3-4f65-876d-37131ce8f430 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-stream.rst | unknown | cfd3d5b2-49a3-46d9-8c22-0f8865cab2d7 | 20,602 | supabase-export-v2 | 662b0e4a56cafd5e | Start a socket server.
The *client_connected_cb* callback is called whenever a new client
connection is established. It receives a ``(reader, writer)`` pair
as two arguments, instances of the :class:`StreamReader` and
:class:`StreamWriter` classes. | trusted_official_docs | CPython Docs | Start a socket server.
The *client_connected_cb* callback is called whenever a new client
connection is established. It receives a ``(reader, writer)`` pair
as two arguments, instances of the :class:`StreamReader` and
:class:`StreamWriter` classes. | Start a socket server.
The *client_connected_cb* callback is called whenever a new client
connection is established. It receives a ``(reader, writer)`` pair
as two arguments, instances of the :class:`StreamReader` and
:class:`StreamWriter` classes. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
99b44579-0b83-4aa6-8186-700e1200b558 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-stream.rst | unknown | cfd3d5b2-49a3-46d9-8c22-0f8865cab2d7 | 20,689 | supabase-export-v2 | 3261b8d315d11e56 | the buffer is drained down to the low watermark and writing can be resumed. When there is nothing to wait for, the :meth:`drain` returns immediately.
.. method:: start_tls(sslcontext, *, server_hostname=None, \
ssl_handshake_timeout=None, ssl_shutdown_timeout=None)
:async: | trusted_official_docs | CPython Docs | the buffer is drained down to the low watermark and writing can be resumed. When there is nothing to wait for, the :meth:`drain` returns immediately.
.. method:: start_tls(sslcontext, *, server_hostname=None, \
ssl_handshake_timeout=None, ssl_shutdown_timeout=None)
:async: | the buffer is drained down to the low watermark and writing can be resumed. When there is nothing to wait for, the :meth:`drain` returns immediately.
.. method:: start_tls(sslcontext, *, server_hostname=None, \
ssl_handshake_timeout=None, ssl_shutdown_timeout=None)
:async: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a4c7eb7e-9918-4527-8f7e-9bf9526e4629 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-stream.rst | unknown | cfd3d5b2-49a3-46d9-8c22-0f8865cab2d7 | 20,590 | supabase-export-v2 | 21a788840858d7be | .. function:: open_connection(host=None, port=None, *, \ limit=None, ssl=None, family=0, proto=0, \ flags=0, sock=None, local_addr=None, \ server_hostname=None, ssl_handshake_timeout=None, \ ssl_shutdown_timeout=None, \ happy_eyeballs_delay=None, interleave=None) :async:
Establish a network connection and return a pair... | trusted_official_docs | CPython Docs | .. function:: open_connection(host=None, port=None, *, \ limit=None, ssl=None, family=0, proto=0, \ flags=0, sock=None, local_addr=None, \ server_hostname=None, ssl_handshake_timeout=None, \ ssl_shutdown_timeout=None, \ happy_eyeballs_delay=None, interleave=None) :async:
Establish a network connection and return a pair... | .. function:: open_connection(host=None, port=None, *, \ limit=None, ssl=None, family=0, proto=0, \ flags=0, sock=None, local_addr=None, \ server_hostname=None, ssl_handshake_timeout=None, \ ssl_shutdown_timeout=None, \ happy_eyeballs_delay=None, interleave=None) :async:
Establish a network connection and return a pair... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a716ea40-0d28-4717-96de-a8722da61006 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-stream.rst | unknown | cfd3d5b2-49a3-46d9-8c22-0f8865cab2d7 | 20,603 | supabase-export-v2 | d12a6e38634ebd53 | is called whenever a new client connection is established. It receives a ``(reader, writer)`` pair as two arguments, instances of the :class:`StreamReader` and :class:`StreamWriter` classes.
*client_connected_cb* can be a plain callable or a
:ref:`coroutine function <coroutine>`; if it is a coroutine function,
it wil... | trusted_official_docs | CPython Docs | is called whenever a new client connection is established. It receives a ``(reader, writer)`` pair as two arguments, instances of the :class:`StreamReader` and :class:`StreamWriter` classes.
*client_connected_cb* can be a plain callable or a
:ref:`coroutine function <coroutine>`; if it is a coroutine function,
it wil... | is called whenever a new client connection is established. It receives a ``(reader, writer)`` pair as two arguments, instances of the :class:`StreamReader` and :class:`StreamWriter` classes.
*client_connected_cb* can be a plain callable or a
:ref:`coroutine function <coroutine>`; if it is a coroutine function,
it wil... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b12a594a-38d8-4774-8bf2-1695e1f0b651 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-stream.rst | unknown | cfd3d5b2-49a3-46d9-8c22-0f8865cab2d7 | 20,626 | supabase-export-v2 | 3d4ec97ef3d93122 | Similar to :func:`start_server` but works with Unix sockets.
If *cleanup_socket* is true then the Unix socket will automatically
be removed from the filesystem when the server is closed, unless the
socket has been replaced after the server has been created. | trusted_official_docs | CPython Docs | Similar to :func:`start_server` but works with Unix sockets.
If *cleanup_socket* is true then the Unix socket will automatically
be removed from the filesystem when the server is closed, unless the
socket has been replaced after the server has been created. | Similar to :func:`start_server` but works with Unix sockets.
If *cleanup_socket* is true then the Unix socket will automatically
be removed from the filesystem when the server is closed, unless the
socket has been replaced after the server has been created. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b4f6812b-7018-402d-a520-6d1d10d5ed52 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-stream.rst | unknown | cfd3d5b2-49a3-46d9-8c22-0f8865cab2d7 | 20,747 | supabase-export-v2 | a9f726b4a201d807 | async def wait_for_data(): # Get a reference to the current event loop because # we want to access low-level APIs. loop = asyncio.get_running_loop()
# Create a pair of connected sockets. rsock, wsock = socket.socketpair() | trusted_official_docs | CPython Docs | async def wait_for_data(): # Get a reference to the current event loop because # we want to access low-level APIs. loop = asyncio.get_running_loop()
# Create a pair of connected sockets. rsock, wsock = socket.socketpair() | async def wait_for_data(): # Get a reference to the current event loop because # we want to access low-level APIs. loop = asyncio.get_running_loop()
# Create a pair of connected sockets. rsock, wsock = socket.socketpair() | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b7de21c3-a7eb-43db-91f7-882beb9a57c0 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-stream.rst | unknown | cfd3d5b2-49a3-46d9-8c22-0f8865cab2d7 | 20,694 | supabase-export-v2 | 8b792a7f8683b224 | * *server_hostname*: sets or overrides the host name that the target server's certificate will be matched against.
* *ssl_handshake_timeout* is the time in seconds to wait for the TLS
handshake to complete before aborting the connection. ``60.0`` seconds
if ``None`` (default). | trusted_official_docs | CPython Docs | * *server_hostname*: sets or overrides the host name that the target server's certificate will be matched against.
* *ssl_handshake_timeout* is the time in seconds to wait for the TLS
handshake to complete before aborting the connection. ``60.0`` seconds
if ``None`` (default). | * *server_hostname*: sets or overrides the host name that the target server's certificate will be matched against.
* *ssl_handshake_timeout* is the time in seconds to wait for the TLS
handshake to complete before aborting the connection. ``60.0`` seconds
if ``None`` (default). | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bc6af92a-eae5-4d7a-9e8d-cf99806f2ad8 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-stream.rst | unknown | cfd3d5b2-49a3-46d9-8c22-0f8865cab2d7 | 20,695 | supabase-export-v2 | 3eee3157f4f557bd | * *ssl_handshake_timeout* is the time in seconds to wait for the TLS handshake to complete before aborting the connection. ``60.0`` seconds if ``None`` (default).
* *ssl_shutdown_timeout* is the time in seconds to wait for the SSL shutdown
to complete before aborting the connection. ``30.0`` seconds if ``None``
(defa... | trusted_official_docs | CPython Docs | * *ssl_handshake_timeout* is the time in seconds to wait for the TLS handshake to complete before aborting the connection. ``60.0`` seconds if ``None`` (default).
* *ssl_shutdown_timeout* is the time in seconds to wait for the SSL shutdown
to complete before aborting the connection. ``30.0`` seconds if ``None``
(defa... | * *ssl_handshake_timeout* is the time in seconds to wait for the TLS handshake to complete before aborting the connection. ``60.0`` seconds if ``None`` (default).
* *ssl_shutdown_timeout* is the time in seconds to wait for the SSL shutdown
to complete before aborting the connection. ``30.0`` seconds if ``None``
(defa... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bccddf2c-1a0e-4c3b-82ba-b6954edc72a4 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-stream.rst | unknown | cfd3d5b2-49a3-46d9-8c22-0f8865cab2d7 | 20,604 | supabase-export-v2 | 597fdc37d6fb7f25 | *client_connected_cb* can be a plain callable or a :ref:`coroutine function <coroutine>`; if it is a coroutine function, it will be automatically scheduled as a :class:`Task`.
*limit* determines the buffer size limit used by the
returned :class:`StreamReader` instance. By default the *limit*
is set to 64 KiB. | trusted_official_docs | CPython Docs | *client_connected_cb* can be a plain callable or a :ref:`coroutine function <coroutine>`; if it is a coroutine function, it will be automatically scheduled as a :class:`Task`.
*limit* determines the buffer size limit used by the
returned :class:`StreamReader` instance. By default the *limit*
is set to 64 KiB. | *client_connected_cb* can be a plain callable or a :ref:`coroutine function <coroutine>`; if it is a coroutine function, it will be automatically scheduled as a :class:`Task`.
*limit* determines the buffer size limit used by the
returned :class:`StreamReader` instance. By default the *limit*
is set to 64 KiB. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c155d6de-4de8-410e-9b43-04ceaa3435ab | CPython Docs | file://datasets/cpython/Doc/library/asyncio-stream.rst | unknown | cfd3d5b2-49a3-46d9-8c22-0f8865cab2d7 | 20,605 | supabase-export-v2 | 1b2d72828eeff651 | *limit* determines the buffer size limit used by the returned :class:`StreamReader` instance. By default the *limit* is set to 64 KiB.
The rest of the arguments are passed directly to
:meth:`loop.create_server`. | trusted_official_docs | CPython Docs | *limit* determines the buffer size limit used by the returned :class:`StreamReader` instance. By default the *limit* is set to 64 KiB.
The rest of the arguments are passed directly to
:meth:`loop.create_server`. | *limit* determines the buffer size limit used by the returned :class:`StreamReader` instance. By default the *limit* is set to 64 KiB.
The rest of the arguments are passed directly to
:meth:`loop.create_server`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ce19e439-e0da-4749-b31a-a3d95402c892 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-stream.rst | unknown | cfd3d5b2-49a3-46d9-8c22-0f8865cab2d7 | 20,733 | supabase-export-v2 | 0c80083389247acb | def print_http_headers(url): url = urllib.parse.urlsplit(url) if url.scheme == 'https': reader, writer = await asyncio.open_connection( url.hostname, 443, ssl=True) else: reader, writer = await asyncio.open_connection( url.hostname, 80)
query = (
f"HEAD {url.path or '/'} HTTP/1.0\r\n"
f"Host: {url.hostname}\r\n"
f"\... | trusted_official_docs | CPython Docs | def print_http_headers(url): url = urllib.parse.urlsplit(url) if url.scheme == 'https': reader, writer = await asyncio.open_connection( url.hostname, 443, ssl=True) else: reader, writer = await asyncio.open_connection( url.hostname, 80)
query = (
f"HEAD {url.path or '/'} HTTP/1.0\r\n"
f"Host: {url.hostname}\r\n"
f"\... | def print_http_headers(url): url = urllib.parse.urlsplit(url) if url.scheme == 'https': reader, writer = await asyncio.open_connection( url.hostname, 443, ssl=True) else: reader, writer = await asyncio.open_connection( url.hostname, 80)
query = (
f"HEAD {url.path or '/'} HTTP/1.0\r\n"
f"Host: {url.hostname}\r\n"
f"\... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d578ccc1-4a63-4d30-af07-dae3042735c1 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-stream.rst | unknown | cfd3d5b2-49a3-46d9-8c22-0f8865cab2d7 | 20,608 | supabase-export-v2 | 502ac7a09c4b76cf | The *sock* argument transfers ownership of the socket to the server created. To close the socket, call the server's :meth:`~asyncio.Server.close` method.
.. versionchanged:: 3.7
Added the *ssl_handshake_timeout* and *start_serving* parameters. | trusted_official_docs | CPython Docs | The *sock* argument transfers ownership of the socket to the server created. To close the socket, call the server's :meth:`~asyncio.Server.close` method.
.. versionchanged:: 3.7
Added the *ssl_handshake_timeout* and *start_serving* parameters. | The *sock* argument transfers ownership of the socket to the server created. To close the socket, call the server's :meth:`~asyncio.Server.close` method.
.. versionchanged:: 3.7
Added the *ssl_handshake_timeout* and *start_serving* parameters. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
de714c11-6c91-4ef8-9b80-675c2d1f2931 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-stream.rst | unknown | cfd3d5b2-49a3-46d9-8c22-0f8865cab2d7 | 20,627 | supabase-export-v2 | ea7ef95a3532a0da | socket will automatically be removed from the filesystem when the server is closed, unless the socket has been replaced after the server has been created.
See also the documentation of :meth:`loop.create_unix_server`. | trusted_official_docs | CPython Docs | socket will automatically be removed from the filesystem when the server is closed, unless the socket has been replaced after the server has been created.
See also the documentation of :meth:`loop.create_unix_server`. | socket will automatically be removed from the filesystem when the server is closed, unless the socket has been replaced after the server has been created.
See also the documentation of :meth:`loop.create_unix_server`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
def49d75-b326-4eaa-aa3e-dffd0d0acd36 | CPython Docs | file://datasets/cpython/Doc/library/asyncio-stream.rst | unknown | cfd3d5b2-49a3-46d9-8c22-0f8865cab2d7 | 20,600 | supabase-export-v2 | 0c084ae851f295bf | .. versionchanged:: 3.11 Added the *ssl_shutdown_timeout* parameter.
.. function:: start_server(client_connected_cb, host=None, \
port=None, *, limit=None, \
family=socket.AF_UNSPEC, \
flags=socket.AI_PASSIVE, sock=None, \
backlog=100, ssl=None, reuse_address=None, \
reuse_port=None, keep_alive=None, \
ssl_handsh... | trusted_official_docs | CPython Docs | .. versionchanged:: 3.11 Added the *ssl_shutdown_timeout* parameter.
.. function:: start_server(client_connected_cb, host=None, \
port=None, *, limit=None, \
family=socket.AF_UNSPEC, \
flags=socket.AI_PASSIVE, sock=None, \
backlog=100, ssl=None, reuse_address=None, \
reuse_port=None, keep_alive=None, \
ssl_handsh... | .. versionchanged:: 3.11 Added the *ssl_shutdown_timeout* parameter.
.. function:: start_server(client_connected_cb, host=None, \
port=None, *, limit=None, \
family=socket.AF_UNSPEC, \
flags=socket.AI_PASSIVE, sock=None, \
backlog=100, ssl=None, reuse_address=None, \
reuse_port=None, keep_alive=None, \
ssl_handsh... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e56e2512-ebbe-4f9e-ab64-eecc0ce4063f | CPython Docs | file://datasets/cpython/Doc/library/asyncio-stream.rst | unknown | cfd3d5b2-49a3-46d9-8c22-0f8865cab2d7 | 20,671 | supabase-export-v2 | 994a59d07a295676 | iterable) of bytes to the underlying socket immediately. If that fails, the data is queued in an internal write buffer until it can be sent.
The method should be used along with the ``drain()`` method:: | trusted_official_docs | CPython Docs | iterable) of bytes to the underlying socket immediately. If that fails, the data is queued in an internal write buffer until it can be sent.
The method should be used along with the ``drain()`` method:: | iterable) of bytes to the underlying socket immediately. If that fails, the data is queued in an internal write buffer until it can be sent.
The method should be used along with the ``drain()`` method:: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e8cb4fa2-8d55-43c3-88ea-ff46e9f35b6b | CPython Docs | file://datasets/cpython/Doc/library/asyncio-stream.rst | unknown | cfd3d5b2-49a3-46d9-8c22-0f8865cab2d7 | 20,592 | supabase-export-v2 | dc27c39c12190c68 | The returned *reader* and *writer* objects are instances of :class:`StreamReader` and :class:`StreamWriter` classes.
*limit* determines the buffer size limit used by the
returned :class:`StreamReader` instance. By default the *limit*
is set to 64 KiB. | trusted_official_docs | CPython Docs | The returned *reader* and *writer* objects are instances of :class:`StreamReader` and :class:`StreamWriter` classes.
*limit* determines the buffer size limit used by the
returned :class:`StreamReader` instance. By default the *limit*
is set to 64 KiB. | The returned *reader* and *writer* objects are instances of :class:`StreamReader` and :class:`StreamWriter` classes.
*limit* determines the buffer size limit used by the
returned :class:`StreamReader` instance. By default the *limit*
is set to 64 KiB. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
03cd77d6-ac20-40a9-b281-59f99cd28414 | CPython Docs | file://datasets/cpython/Doc/library/platform.rst | unknown | 1e7f2bcd-52f8-4256-9c17-363d47b8bb03 | 20,850 | supabase-export-v2 | 588cc5c9910313f1 | ``$`` unquoted. The fields ``NAME``, ``ID``, and ``PRETTY_NAME`` are always defined according to the standard. All other fields are optional. Vendors may include additional fields.
Note that fields like ``NAME``, ``VERSION``, and ``VARIANT`` are strings
suitable for presentation to users. Programs should use fields li... | trusted_official_docs | CPython Docs | ``$`` unquoted. The fields ``NAME``, ``ID``, and ``PRETTY_NAME`` are always defined according to the standard. All other fields are optional. Vendors may include additional fields.
Note that fields like ``NAME``, ``VERSION``, and ``VARIANT`` are strings
suitable for presentation to users. Programs should use fields li... | ``$`` unquoted. The fields ``NAME``, ``ID``, and ``PRETTY_NAME`` are always defined according to the standard. All other fields are optional. Vendors may include additional fields.
Note that fields like ``NAME``, ``VERSION``, and ``VARIANT`` are strings
suitable for presentation to users. Programs should use fields li... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
150b59a2-95ea-476a-a891-df3fd915bb66 | CPython Docs | file://datasets/cpython/Doc/library/platform.rst | unknown | 1e7f2bcd-52f8-4256-9c17-363d47b8bb03 | 20,784 | supabase-export-v2 | 433b5e94111066da | Returns the (real) processor name, e.g. ``'amdk6'``.
An empty string is returned if the value cannot be determined. Note that many
platforms do not provide this information or simply return the same value as for
:func:`machine`. NetBSD does this. | trusted_official_docs | CPython Docs | Returns the (real) processor name, e.g. ``'amdk6'``.
An empty string is returned if the value cannot be determined. Note that many
platforms do not provide this information or simply return the same value as for
:func:`machine`. NetBSD does this. | Returns the (real) processor name, e.g. ``'amdk6'``.
An empty string is returned if the value cannot be determined. Note that many
platforms do not provide this information or simply return the same value as for
:func:`machine`. NetBSD does this. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2bc31e8f-1092-4dbc-9f6d-7b40eef34f38 | CPython Docs | file://datasets/cpython/Doc/library/platform.rst | unknown | 1e7f2bcd-52f8-4256-9c17-363d47b8bb03 | 20,824 | supabase-export-v2 | ed1e1c6f49b430ef | and OS type (multi/single processor). Values which cannot be determined are set to the defaults given as parameters (which all default to an empty string).
As a hint: *ptype* is ``'Uniprocessor Free'`` on single processor NT machines
and ``'Multiprocessor Free'`` on multi processor machines. The ``'Free'`` refers
to ... | trusted_official_docs | CPython Docs | and OS type (multi/single processor). Values which cannot be determined are set to the defaults given as parameters (which all default to an empty string).
As a hint: *ptype* is ``'Uniprocessor Free'`` on single processor NT machines
and ``'Multiprocessor Free'`` on multi processor machines. The ``'Free'`` refers
to ... | and OS type (multi/single processor). Values which cannot be determined are set to the defaults given as parameters (which all default to an empty string).
As a hint: *ptype* is ``'Uniprocessor Free'`` on single processor NT machines
and ``'Multiprocessor Free'`` on multi processor machines. The ``'Free'`` refers
to ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
32160032-ce08-4a0c-bc55-7ee7d31abf08 | CPython Docs | file://datasets/cpython/Doc/library/platform.rst | unknown | 1e7f2bcd-52f8-4256-9c17-363d47b8bb03 | 20,778 | supabase-export-v2 | 1fdb33454acebacf | Returns a single string identifying the underlying platform with as much useful information as possible.
The output is intended to be *human readable* rather than machine parseable. It
may look different on different platforms and this is intended. | trusted_official_docs | CPython Docs | Returns a single string identifying the underlying platform with as much useful information as possible.
The output is intended to be *human readable* rather than machine parseable. It
may look different on different platforms and this is intended. | Returns a single string identifying the underlying platform with as much useful information as possible.
The output is intended to be *human readable* rather than machine parseable. It
may look different on different platforms and this is intended. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
33a70beb-e179-49e3-b913-f1c9d2874978 | CPython Docs | file://datasets/cpython/Doc/library/platform.rst | unknown | 1e7f2bcd-52f8-4256-9c17-363d47b8bb03 | 20,843 | supabase-export-v2 | 738edd6ab87fc647 | (defaults to the Python interpreter) is linked. Returns a tuple of strings ``(lib, version)`` which default to the given parameters in case the lookup fails.
Note that this function has intimate knowledge of how different libc versions
add symbols to the executable is probably only usable for executables compiled
usi... | trusted_official_docs | CPython Docs | (defaults to the Python interpreter) is linked. Returns a tuple of strings ``(lib, version)`` which default to the given parameters in case the lookup fails.
Note that this function has intimate knowledge of how different libc versions
add symbols to the executable is probably only usable for executables compiled
usi... | (defaults to the Python interpreter) is linked. Returns a tuple of strings ``(lib, version)`` which default to the given parameters in case the lookup fails.
Note that this function has intimate knowledge of how different libc versions
add symbols to the executable is probably only usable for executables compiled
usi... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3db3bd8b-35f4-40e7-8a8b-fdc4741d76e3 | CPython Docs | file://datasets/cpython/Doc/library/platform.rst | unknown | 1e7f2bcd-52f8-4256-9c17-363d47b8bb03 | 20,873 | supabase-export-v2 | 6033e545f230c70f | Print platform information without system/OS name aliasing. This is equivalent to calling :func:`platform.platform` with the *aliased* argument set to ``True``.
You can also pass one or more positional arguments (``terse``, ``nonaliased``)
to explicitly control the output format. These behave similarly to their
corresp... | trusted_official_docs | CPython Docs | Print platform information without system/OS name aliasing. This is equivalent to calling :func:`platform.platform` with the *aliased* argument set to ``True``.
You can also pass one or more positional arguments (``terse``, ``nonaliased``)
to explicitly control the output format. These behave similarly to their
corresp... | Print platform information without system/OS name aliasing. This is equivalent to calling :func:`platform.platform` with the *aliased* argument set to ``True``.
You can also pass one or more positional arguments (``terse``, ``nonaliased``)
to explicitly control the output format. These behave similarly to their
corresp... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3f2c8be6-d03a-429a-983f-164183127f8e | CPython Docs | file://datasets/cpython/Doc/library/platform.rst | unknown | 1e7f2bcd-52f8-4256-9c17-363d47b8bb03 | 20,779 | supabase-export-v2 | 8f7e80d69af8553b | The output is intended to be *human readable* rather than machine parseable. It may look different on different platforms and this is intended.
If *aliased* is true, the function will use aliases for various platforms that
report system names which differ from their common names, for example SunOS will
be reported as... | trusted_official_docs | CPython Docs | The output is intended to be *human readable* rather than machine parseable. It may look different on different platforms and this is intended.
If *aliased* is true, the function will use aliases for various platforms that
report system names which differ from their common names, for example SunOS will
be reported as... | The output is intended to be *human readable* rather than machine parseable. It may look different on different platforms and this is intended.
If *aliased* is true, the function will use aliases for various platforms that
report system names which differ from their common names, for example SunOS will
be reported as... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3fda59ef-0f94-496e-bfce-de81e8715898 | CPython Docs | file://datasets/cpython/Doc/library/platform.rst | unknown | 1e7f2bcd-52f8-4256-9c17-363d47b8bb03 | 20,823 | supabase-export-v2 | 61433dc9c8cc8620 | .. function:: win32_ver(release='', version='', csd='', ptype='')
Get additional version information from the Windows Registry and return a tuple
``(release, version, csd, ptype)`` referring to OS release, version number,
CSD level (service pack) and OS type (multi/single processor). Values which
cannot be determine... | trusted_official_docs | CPython Docs | .. function:: win32_ver(release='', version='', csd='', ptype='')
Get additional version information from the Windows Registry and return a tuple
``(release, version, csd, ptype)`` referring to OS release, version number,
CSD level (service pack) and OS type (multi/single processor). Values which
cannot be determine... | .. function:: win32_ver(release='', version='', csd='', ptype='')
Get additional version information from the Windows Registry and return a tuple
``(release, version, csd, ptype)`` referring to OS release, version number,
CSD level (service pack) and OS type (multi/single processor). Values which
cannot be determine... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4a3e5f0b-c2f4-4dde-b5f4-12f475d4564f | CPython Docs | file://datasets/cpython/Doc/library/platform.rst | unknown | 1e7f2bcd-52f8-4256-9c17-363d47b8bb03 | 20,810 | supabase-export-v2 | 0c53f3982b3ac055 | Returns the system's release version, e.g. ``'#3 on degas'``. An empty string is returned if the value cannot be determined.
On iOS and Android, this is the user-facing OS version. To obtain the
Darwin or Linux kernel version, use :func:`os.uname`. | trusted_official_docs | CPython Docs | Returns the system's release version, e.g. ``'#3 on degas'``. An empty string is returned if the value cannot be determined.
On iOS and Android, this is the user-facing OS version. To obtain the
Darwin or Linux kernel version, use :func:`os.uname`. | Returns the system's release version, e.g. ``'#3 on degas'``. An empty string is returned if the value cannot be determined.
On iOS and Android, this is the user-facing OS version. To obtain the
Darwin or Linux kernel version, use :func:`os.uname`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
542f27cb-5521-47f3-a1d5-e798c2d326d2 | CPython Docs | file://datasets/cpython/Doc/library/platform.rst | unknown | 1e7f2bcd-52f8-4256-9c17-363d47b8bb03 | 20,769 | supabase-export-v2 | aca28365ba0dfa7a | On macOS (and perhaps other platforms), executable files may be universal files containing multiple architectures.
To get at the "64-bitness" of the current interpreter, it is more
reliable to query the :data:`sys.maxsize` attribute:: | trusted_official_docs | CPython Docs | On macOS (and perhaps other platforms), executable files may be universal files containing multiple architectures.
To get at the "64-bitness" of the current interpreter, it is more
reliable to query the :data:`sys.maxsize` attribute:: | On macOS (and perhaps other platforms), executable files may be universal files containing multiple architectures.
To get at the "64-bitness" of the current interpreter, it is more
reliable to query the :data:`sys.maxsize` attribute:: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5813de2a-92ba-4f8a-8f73-45674f742b7d | CPython Docs | file://datasets/cpython/Doc/library/platform.rst | unknown | 1e7f2bcd-52f8-4256-9c17-363d47b8bb03 | 20,780 | supabase-export-v2 | f256b30f53f25efe | report system names which differ from their common names, for example SunOS will be reported as Solaris. The :func:`system_alias` function is used to implement this.
Setting *terse* to true causes the function to return only the absolute minimum
information needed to identify the platform. | trusted_official_docs | CPython Docs | report system names which differ from their common names, for example SunOS will be reported as Solaris. The :func:`system_alias` function is used to implement this.
Setting *terse* to true causes the function to return only the absolute minimum
information needed to identify the platform. | report system names which differ from their common names, for example SunOS will be reported as Solaris. The :func:`system_alias` function is used to implement this.
Setting *terse* to true causes the function to return only the absolute minimum
information needed to identify the platform. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
59443942-2eb7-41e9-bb21-7665fab4f864 | CPython Docs | file://datasets/cpython/Doc/library/platform.rst | unknown | 1e7f2bcd-52f8-4256-9c17-363d47b8bb03 | 20,842 | supabase-export-v2 | 9540d978b731f03f | .. function:: libc_ver(executable=sys.executable, lib='', version='', chunksize=16384)
Tries to determine the libc version against which the file executable (defaults
to the Python interpreter) is linked. Returns a tuple of strings ``(lib,
version)`` which default to the given parameters in case the lookup fails. | trusted_official_docs | CPython Docs | .. function:: libc_ver(executable=sys.executable, lib='', version='', chunksize=16384)
Tries to determine the libc version against which the file executable (defaults
to the Python interpreter) is linked. Returns a tuple of strings ``(lib,
version)`` which default to the given parameters in case the lookup fails. | .. function:: libc_ver(executable=sys.executable, lib='', version='', chunksize=16384)
Tries to determine the libc version against which the file executable (defaults
to the Python interpreter) is linked. Returns a tuple of strings ``(lib,
version)`` which default to the given parameters in case the lookup fails. | python, official-docs, cpython, P0 | Local_Trusted_Corpus |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.