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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
14734c0a-c5bf-47fa-b248-977bb91537bc | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,402 | supabase-export-v2 | 30dfb2e47c48616d | .. method:: writelines(list)
Writes the concatenated iterable of strings to the stream (possibly by reusing
the :meth:`write` method). Infinite or
very large iterables are not supported. The standard bytes-to-bytes codecs
do not support this method. | trusted_official_docs | CPython Docs | .. method:: writelines(list)
Writes the concatenated iterable of strings to the stream (possibly by reusing
the :meth:`write` method). Infinite or
very large iterables are not supported. The standard bytes-to-bytes codecs
do not support this method. | .. method:: writelines(list)
Writes the concatenated iterable of strings to the stream (possibly by reusing
the :meth:`write` method). Infinite or
very large iterables are not supported. The standard bytes-to-bytes codecs
do not support this method. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
14d191d2-f8d6-4d33-b4cb-36cedc73cf7e | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,429 | supabase-export-v2 | fc9c736606626da0 | Read all lines available on the input stream and return them as a list of lines.
Line-endings are implemented using the codec's :meth:`decode` method and
are included in the list entries if *keepends* is true. | trusted_official_docs | CPython Docs | Read all lines available on the input stream and return them as a list of lines.
Line-endings are implemented using the codec's :meth:`decode` method and
are included in the list entries if *keepends* is true. | Read all lines available on the input stream and return them as a list of lines.
Line-endings are implemented using the codec's :meth:`decode` method and
are included in the list entries if *keepends* is true. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
15090060-8567-44d8-961b-7b5d4326cd18 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,499 | supabase-export-v2 | 4bdd05d8694b9e72 | Encoding of PalmOS 3.5. | +--------------------+---------+---------------------------+ | punycode | | Implement :rfc:`3492`. | | | | Stateful codecs are not | | | | supported.
|
+--------------------+---------+---------------------------+
| raw_unicode_escape | | Latin-1 encoding with |
| | | :samp:`\\u{XXXX}` and |
| ... | trusted_official_docs | CPython Docs | Encoding of PalmOS 3.5. | +--------------------+---------+---------------------------+ | punycode | | Implement :rfc:`3492`. | | | | Stateful codecs are not | | | | supported.
|
+--------------------+---------+---------------------------+
| raw_unicode_escape | | Latin-1 encoding with |
| | | :samp:`\\u{XXXX}` and |
| ... | Encoding of PalmOS 3.5. | +--------------------+---------+---------------------------+ | punycode | | Implement :rfc:`3492`. | | | | Stateful codecs are not | | | | supported.
|
+--------------------+---------+---------------------------+
| raw_unicode_escape | | Latin-1 encoding with |
| | | :samp:`\\u{XXXX}` and |
| ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1509ac0d-602d-4a3a-bdd9-3b22c47059d8 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,345 | supabase-export-v2 | 6db7aa3d581723f3 | The *errors* argument defines the error handling to apply. It defaults to ``'strict'`` handling.
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. | trusted_official_docs | CPython Docs | The *errors* argument defines the error handling to apply. It defaults to ``'strict'`` handling.
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 *errors* argument defines the error handling to apply. It defaults to ``'strict'`` handling.
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. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1cfd98f7-022b-4877-9d8e-886a68cfa974 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,278 | supabase-export-v2 | 99e8c067c5813881 | Return a :class:`tuple` containing the raw bytes of *buffer*, a :ref:`buffer-compatible object <bufferobjects>` or :class:`str` (encoded to UTF-8 before processing), and their length in bytes.
The *errors* argument is ignored. | trusted_official_docs | CPython Docs | Return a :class:`tuple` containing the raw bytes of *buffer*, a :ref:`buffer-compatible object <bufferobjects>` or :class:`str` (encoded to UTF-8 before processing), and their length in bytes.
The *errors* argument is ignored. | Return a :class:`tuple` containing the raw bytes of *buffer*, a :ref:`buffer-compatible object <bufferobjects>` or :class:`str` (encoded to UTF-8 before processing), and their length in bytes.
The *errors* argument is ignored. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1d2aeefd-daaa-4a42-993d-43c56f71b92a | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,379 | supabase-export-v2 | 4e65c93e86fb6d75 | The :class:`IncrementalDecoder` may implement different error handling schemes by providing the *errors* keyword argument. See :ref:`error-handlers` for possible values.
The *errors* argument will be assigned to an attribute of the same name. Assigning to this attribute makes it possible to switch between different err... | trusted_official_docs | CPython Docs | The :class:`IncrementalDecoder` may implement different error handling schemes by providing the *errors* keyword argument. See :ref:`error-handlers` for possible values.
The *errors* argument will be assigned to an attribute of the same name. Assigning to this attribute makes it possible to switch between different err... | The :class:`IncrementalDecoder` may implement different error handling schemes by providing the *errors* keyword argument. See :ref:`error-handlers` for possible values.
The *errors* argument will be assigned to an attribute of the same name. Assigning to this attribute makes it possible to switch between different err... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1d5061de-8337-4ad0-b665-c546226f9952 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,556 | supabase-export-v2 | f83fc01476b3419e | application should transparently convert Unicode domain labels to IDNA on the wire, and convert back ACE labels to Unicode before presenting them to the user.
Python supports this conversion in several ways: the ``idna`` codec performs
conversion between Unicode and ACE, separating an input string into labels
based on ... | trusted_official_docs | CPython Docs | application should transparently convert Unicode domain labels to IDNA on the wire, and convert back ACE labels to Unicode before presenting them to the user.
Python supports this conversion in several ways: the ``idna`` codec performs
conversion between Unicode and ACE, separating an input string into labels
based on ... | application should transparently convert Unicode domain labels to IDNA on the wire, and convert back ACE labels to Unicode before presenting them to the user.
Python supports this conversion in several ways: the ``idna`` codec performs
conversion between Unicode and ACE, separating an input string into labels
based on ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1dda6d24-387c-4d92-a36d-d747a09a08db | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,474 | supabase-export-v2 | 9e609c62e2f32e18 | The below table lists the most common aliases, for a complete list refer to the source :source:`aliases.py <Lib/encodings/aliases.py>` file.
On Windows, ``cpXXX`` codecs are available for all code pages. But only codecs listed in the following table are guaranteed to exist on
other platforms. | trusted_official_docs | CPython Docs | The below table lists the most common aliases, for a complete list refer to the source :source:`aliases.py <Lib/encodings/aliases.py>` file.
On Windows, ``cpXXX`` codecs are available for all code pages. But only codecs listed in the following table are guaranteed to exist on
other platforms. | The below table lists the most common aliases, for a complete list refer to the source :source:`aliases.py <Lib/encodings/aliases.py>` file.
On Windows, ``cpXXX`` codecs are available for all code pages. But only codecs listed in the following table are guaranteed to exist on
other platforms. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1f4d69cf-569f-453a-bca5-009a60f71548 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,487 | supabase-export-v2 | bd954c17dc8d9ba7 | | Korean | +-----------------+--------------------------------+--------------------------------+ | koi8_r | | Russian | +-----------------+--------------------------------+--------------------------------+ | koi8_t | | Tajik | | | | | | | | ..
versionadded:: 3.5 |
+-----------------+--------------------------------+---... | trusted_official_docs | CPython Docs | | Korean | +-----------------+--------------------------------+--------------------------------+ | koi8_r | | Russian | +-----------------+--------------------------------+--------------------------------+ | koi8_t | | Tajik | | | | | | | | ..
versionadded:: 3.5 |
+-----------------+--------------------------------+---... | | Korean | +-----------------+--------------------------------+--------------------------------+ | koi8_r | | Russian | +-----------------+--------------------------------+--------------------------------+ | koi8_t | | Tajik | | | | | | | | ..
versionadded:: 3.5 |
+-----------------+--------------------------------+---... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1f9713bb-9ae6-49da-8e87-695884b5df45 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,361 | supabase-export-v2 | e11f5783ab42c867 | Constructor for an :class:`IncrementalEncoder` instance.
All incremental encoders 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:`IncrementalEncoder` instance.
All incremental encoders 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:`IncrementalEncoder` instance.
All incremental encoders 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 | |
2543c641-720c-4025-940b-4892b79fd26c | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,397 | supabase-export-v2 | d65a47976d3c9c86 | The *stream* argument must be a file-like object open for writing text or binary data, as appropriate for the specific codec.
The :class:`StreamWriter` 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 writing text or binary data, as appropriate for the specific codec.
The :class:`StreamWriter` 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 writing text or binary data, as appropriate for the specific codec.
The :class:`StreamWriter` 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 | |
26614466-1e68-4e9f-ba5d-0b33f66767f6 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,291 | supabase-export-v2 | d814af5af21547fd | To simplify and standardize error handling, codecs may implement different error handling schemes by accepting the *errors* string argument:
>>> 'German ß, ♬'.encode(encoding='ascii', errors='backslashreplace')
b'German \\xdf, \\u266c'
>>> 'German ß, ♬'.encode(encoding='ascii', errors='xmlcharrefreplace')
b'German &... | trusted_official_docs | CPython Docs | To simplify and standardize error handling, codecs may implement different error handling schemes by accepting the *errors* string argument:
>>> 'German ß, ♬'.encode(encoding='ascii', errors='backslashreplace')
b'German \\xdf, \\u266c'
>>> 'German ß, ♬'.encode(encoding='ascii', errors='xmlcharrefreplace')
b'German &... | To simplify and standardize error handling, codecs may implement different error handling schemes by accepting the *errors* string argument:
>>> 'German ß, ♬'.encode(encoding='ascii', errors='backslashreplace')
b'German \\xdf, \\u266c'
>>> 'German ß, ♬'.encode(encoding='ascii', errors='xmlcharrefreplace')
b'German &... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
274210f7-b541-43ae-8e94-3ecbd343c549 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,299 | supabase-export-v2 | fd7fb9efebc0d2d1 | .. index:: pair: xmlcharrefreplace; error handler's name pair: namereplace; error handler's name single: \N; escape sequence
The following error handlers are only applicable to encoding (within
:term:`text encodings <text encoding>`): | trusted_official_docs | CPython Docs | .. index:: pair: xmlcharrefreplace; error handler's name pair: namereplace; error handler's name single: \N; escape sequence
The following error handlers are only applicable to encoding (within
:term:`text encodings <text encoding>`): | .. index:: pair: xmlcharrefreplace; error handler's name pair: namereplace; error handler's name single: \N; escape sequence
The following error handlers are only applicable to encoding (within
:term:`text encodings <text encoding>`): | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
28226133-8916-4c3b-a007-efdb2b2cb224 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,500 | supabase-export-v2 | d33d5998611e722b | pickle protocol. | +--------------------+---------+---------------------------+ | undefined | | This Codec should only | | | | be used for testing | | | | purposes.
|
| | | |
| | | Raise an exception for |
| | | all conversions, even |
| | | empty strings. The error |
| | | handler is ignored. |
+--------------------+-... | trusted_official_docs | CPython Docs | pickle protocol. | +--------------------+---------+---------------------------+ | undefined | | This Codec should only | | | | be used for testing | | | | purposes.
|
| | | |
| | | Raise an exception for |
| | | all conversions, even |
| | | empty strings. The error |
| | | handler is ignored. |
+--------------------+-... | pickle protocol. | +--------------------+---------+---------------------------+ | undefined | | This Codec should only | | | | be used for testing | | | | purposes.
|
| | | |
| | | Raise an exception for |
| | | all conversions, even |
| | | empty strings. The error |
| | | handler is ignored. |
+--------------------+-... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2f915097-e7e4-44d6-ab39-04fa50fcbf7b | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,509 | supabase-export-v2 | 1175e9a317e620e9 | | | | | decoding | | +----------------------+------------------+------------------------------+------------------------------+ | bz2_codec | bz2 | Compress the operand using | :meth:`bz2.compress` / | | | | bz2.
| :meth:`bz2.decompress` |
+----------------------+------------------+------------------------------+-------... | trusted_official_docs | CPython Docs | | | | | decoding | | +----------------------+------------------+------------------------------+------------------------------+ | bz2_codec | bz2 | Compress the operand using | :meth:`bz2.compress` / | | | | bz2.
| :meth:`bz2.decompress` |
+----------------------+------------------+------------------------------+-------... | | | | | decoding | | +----------------------+------------------+------------------------------+------------------------------+ | bz2_codec | bz2 | Compress the operand using | :meth:`bz2.compress` / | | | | bz2.
| :meth:`bz2.decompress` |
+----------------------+------------------+------------------------------+-------... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
30fb5c8e-7539-46ce-948d-47fe938025ad | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,355 | supabase-export-v2 | ccb516e49c6f2115 | function, but with multiple calls to the :meth:`~IncrementalEncoder.encode`/:meth:`~IncrementalDecoder.decode` method of the incremental encoder/decoder. The incremental encoder/decoder keeps track of the encoding/decoding process during method calls.
The joined output of calls to the
:meth:`~IncrementalEncoder.encode`... | trusted_official_docs | CPython Docs | function, but with multiple calls to the :meth:`~IncrementalEncoder.encode`/:meth:`~IncrementalDecoder.decode` method of the incremental encoder/decoder. The incremental encoder/decoder keeps track of the encoding/decoding process during method calls.
The joined output of calls to the
:meth:`~IncrementalEncoder.encode`... | function, but with multiple calls to the :meth:`~IncrementalEncoder.encode`/:meth:`~IncrementalDecoder.decode` method of the incremental encoder/decoder. The incremental encoder/decoder keeps track of the encoding/decoding process during method calls.
The joined output of calls to the
:meth:`~IncrementalEncoder.encode`... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
332d6d8e-3aea-40b7-b924-d80dd9f7164b | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,256 | supabase-export-v2 | e254d392f219d80f | .. function:: open(filename, mode='r', encoding=None, errors='strict', buffering=-1)
Open an encoded file using the given *mode* and return an instance of
:class:`StreamReaderWriter`, providing transparent encoding/decoding. The default file mode is ``'r'``, meaning to open the file in read mode. | trusted_official_docs | CPython Docs | .. function:: open(filename, mode='r', encoding=None, errors='strict', buffering=-1)
Open an encoded file using the given *mode* and return an instance of
:class:`StreamReaderWriter`, providing transparent encoding/decoding. The default file mode is ``'r'``, meaning to open the file in read mode. | .. function:: open(filename, mode='r', encoding=None, errors='strict', buffering=-1)
Open an encoded file using the given *mode* and return an instance of
:class:`StreamReaderWriter`, providing transparent encoding/decoding. The default file mode is ``'r'``, meaning to open the file in read mode. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3627c63c-e136-4ed5-9053-b6d99cc210d9 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,312 | supabase-export-v2 | 44020af74b71c059 | name *name*. The *error_handler* argument will be called during encoding and decoding in case of an error, when *name* is specified as the errors parameter.
For encoding, *error_handler* will be called with a :exc:`UnicodeEncodeError`
instance, which contains information about the location of the error. The
error han... | trusted_official_docs | CPython Docs | name *name*. The *error_handler* argument will be called during encoding and decoding in case of an error, when *name* is specified as the errors parameter.
For encoding, *error_handler* will be called with a :exc:`UnicodeEncodeError`
instance, which contains information about the location of the error. The
error han... | name *name*. The *error_handler* argument will be called during encoding and decoding in case of an error, when *name* is specified as the errors parameter.
For encoding, *error_handler* will be called with a :exc:`UnicodeEncodeError`
instance, which contains information about the location of the error. The
error han... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
36b9fc90-ccb1-4837-bccf-cfb3fc97616f | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,456 | supabase-export-v2 | 5c830ba69b185cad | of bytes is known as *decoding*. There are a variety of different text serialisation codecs, which are collectivity referred to as :term:`text encodings <text encoding>`.
The simplest text encoding (called ``'latin-1'`` or ``'iso-8859-1'``) maps
the code points 0--255 to the bytes ``0x0``--``0xff``, which means that a ... | trusted_official_docs | CPython Docs | of bytes is known as *decoding*. There are a variety of different text serialisation codecs, which are collectivity referred to as :term:`text encodings <text encoding>`.
The simplest text encoding (called ``'latin-1'`` or ``'iso-8859-1'``) maps
the code points 0--255 to the bytes ``0x0``--``0xff``, which means that a ... | of bytes is known as *decoding*. There are a variety of different text serialisation codecs, which are collectivity referred to as :term:`text encodings <text encoding>`.
The simplest text encoding (called ``'latin-1'`` or ``'iso-8859-1'``) maps
the code points 0--255 to the bytes ``0x0``--``0xff``, which means that a ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
385851b2-8d7a-483f-9108-4d3a4320dd12 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,421 | supabase-export-v2 | addf76a574cd8ba9 | value -1 indicates to read and decode as much as possible. This parameter is intended to prevent having to decode huge files in one step.
The *firstline* flag indicates that
it would be sufficient to only return the first
line, if there are decoding errors on later lines. | trusted_official_docs | CPython Docs | value -1 indicates to read and decode as much as possible. This parameter is intended to prevent having to decode huge files in one step.
The *firstline* flag indicates that
it would be sufficient to only return the first
line, if there are decoding errors on later lines. | value -1 indicates to read and decode as much as possible. This parameter is intended to prevent having to decode huge files in one step.
The *firstline* flag indicates that
it would be sufficient to only return the first
line, if there are decoding errors on later lines. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3a440475-f192-4edc-8477-7fc30727e03b | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,406 | supabase-export-v2 | e9a28b3c50a40d19 | 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.
In addition to the above methods, the :class:`StreamWriter` must also inherit
all other methods and attributes from the underlying stream. | trusted_official_docs | CPython Docs | 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.
In addition to the above methods, the :class:`StreamWriter` must also inherit
all other methods and attributes from the underlying stream. | 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.
In addition to the above methods, the :class:`StreamWriter` must also inherit
all other methods and attributes from the underlying stream. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3b3266a0-f0df-40a3-b31b-c2e1cb7df277 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,228 | supabase-export-v2 | b9aa8c7cf02452d7 | .. attribute:: streamwriter streamreader
Stream writer and reader classes or factory functions. These have to
provide the interface defined by the base classes
:class:`StreamWriter` and :class:`StreamReader`, respectively. Stream codecs can maintain state. | trusted_official_docs | CPython Docs | .. attribute:: streamwriter streamreader
Stream writer and reader classes or factory functions. These have to
provide the interface defined by the base classes
:class:`StreamWriter` and :class:`StreamReader`, respectively. Stream codecs can maintain state. | .. attribute:: streamwriter streamreader
Stream writer and reader classes or factory functions. These have to
provide the interface defined by the base classes
:class:`StreamWriter` and :class:`StreamReader`, respectively. Stream codecs can maintain state. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3b6b0b92-7a33-4d24-b4e3-8b23d6f092ac | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,211 | supabase-export-v2 | c39086feaf05381b | Decodes *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 decoding errors raise
:exc:`ValueError` (or a more codec specific subclass, such as
:exc:`UnicodeDecodeError`). Refer to :ref:`codec-base-cla... | trusted_official_docs | CPython Docs | Decodes *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 decoding errors raise
:exc:`ValueError` (or a more codec specific subclass, such as
:exc:`UnicodeDecodeError`). Refer to :ref:`codec-base-cla... | Decodes *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 decoding errors raise
:exc:`ValueError` (or a more codec specific subclass, such as
:exc:`UnicodeDecodeError`). Refer to :ref:`codec-base-cla... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3c7155e9-57d9-4bd8-a97b-4f9c65d1e22d | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,344 | supabase-export-v2 | dbe1f37087384eab | object, length consumed). For instance, :term:`text encoding` converts a string object to a bytes object using a particular character set encoding (e.g., ``cp1252`` or ``iso-8859-1``).
The *errors* argument defines the error handling to apply. It defaults to ``'strict'`` handling. | trusted_official_docs | CPython Docs | object, length consumed). For instance, :term:`text encoding` converts a string object to a bytes object using a particular character set encoding (e.g., ``cp1252`` or ``iso-8859-1``).
The *errors* argument defines the error handling to apply. It defaults to ``'strict'`` handling. | object, length consumed). For instance, :term:`text encoding` converts a string object to a bytes object using a particular character set encoding (e.g., ``cp1252`` or ``iso-8859-1``).
The *errors* argument defines the error handling to apply. It defaults to ``'strict'`` handling. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3d741099-1ad0-4dfe-b6c5-a6a0968440b5 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,498 | supabase-export-v2 | e810a0e1e4f775cc | | mbcs | ansi, | Windows only: Encode the | | | dbcs | operand according to the | | | | ANSI codepage (CP_ACP).
|
+--------------------+---------+---------------------------+
| oem | | Windows only: Encode the |
| | | operand according to the |
| | | OEM codepage (CP_OEMCP). |
| | | |
| | | .. versionadded:: 3.6 |
+---... | trusted_official_docs | CPython Docs | | mbcs | ansi, | Windows only: Encode the | | | dbcs | operand according to the | | | | ANSI codepage (CP_ACP).
|
+--------------------+---------+---------------------------+
| oem | | Windows only: Encode the |
| | | operand according to the |
| | | OEM codepage (CP_OEMCP). |
| | | |
| | | .. versionadded:: 3.6 |
+---... | | mbcs | ansi, | Windows only: Encode the | | | dbcs | operand according to the | | | | ANSI codepage (CP_ACP).
|
+--------------------+---------+---------------------------+
| oem | | Windows only: Encode the |
| | | operand according to the |
| | | OEM codepage (CP_OEMCP). |
| | | |
| | | .. versionadded:: 3.6 |
+---... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4140d12b-da7e-40a0-9c01-2662e0039aa5 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,204 | supabase-export-v2 | b75096eedcc64814 | --------------
This module defines base classes for standard Python codecs (encoders and
decoders) and provides access to the internal Python codec registry, which
manages the codec and error handling lookup process. Most standard codecs
are :term:`text encodings <text encoding>`, which encode text to bytes (and
decode... | trusted_official_docs | CPython Docs | --------------
This module defines base classes for standard Python codecs (encoders and
decoders) and provides access to the internal Python codec registry, which
manages the codec and error handling lookup process. Most standard codecs
are :term:`text encodings <text encoding>`, which encode text to bytes (and
decode... | --------------
This module defines base classes for standard Python codecs (encoders and
decoders) and provides access to the internal Python codec registry, which
manages the codec and error handling lookup process. Most standard codecs
are :term:`text encodings <text encoding>`, which encode text to bytes (and
decode... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4387ba76-fb6e-4e40-863c-7d29a92441c4 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,255 | supabase-export-v2 | 6149b4f56320e4fc | 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:
.. function:: open(filename, mode='r', encoding=None, errors='strict', buffering=-1) | trusted_official_docs | CPython Docs | 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:
.. function:: open(filename, mode='r', encoding=None, errors='strict', buffering=-1) | 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:
.. function:: open(filename, mode='r', encoding=None, errors='strict', buffering=-1) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4392cc99-9a16-43f5-8cf6-a28d9ff2a4a8 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,516 | supabase-export-v2 | 620d133152981242 | Standalone Codec Functions ^^^^^^^^^^^^^^^^^^^^^^^^^^
The following functions provide encoding and decoding functionality similar to codecs,
but are not available as named codecs through :func:`codecs.encode` or :func:`codecs.decode`. They are used internally (for example, by :mod:`pickle`) and behave similarly to the
... | trusted_official_docs | CPython Docs | Standalone Codec Functions ^^^^^^^^^^^^^^^^^^^^^^^^^^
The following functions provide encoding and decoding functionality similar to codecs,
but are not available as named codecs through :func:`codecs.encode` or :func:`codecs.decode`. They are used internally (for example, by :mod:`pickle`) and behave similarly to the
... | Standalone Codec Functions ^^^^^^^^^^^^^^^^^^^^^^^^^^
The following functions provide encoding and decoding functionality similar to codecs,
but are not available as named codecs through :func:`codecs.encode` or :func:`codecs.decode`. They are used internally (for example, by :mod:`pickle`) and behave similarly to the
... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
465a5240-0994-4779-ad24-b6d44c740ff6 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,477 | supabase-export-v2 | 7108f0ab1b3a5eb8 | ascii, us-ascii, utf-16, utf16, utf-32, utf32, and the same using underscores instead of dashes. Using alternative aliases for these encodings may result in slower execution.
.. versionchanged:: 3.6
Optimization opportunity recognized for us-ascii. | trusted_official_docs | CPython Docs | ascii, us-ascii, utf-16, utf16, utf-32, utf32, and the same using underscores instead of dashes. Using alternative aliases for these encodings may result in slower execution.
.. versionchanged:: 3.6
Optimization opportunity recognized for us-ascii. | ascii, us-ascii, utf-16, utf16, utf-32, utf32, and the same using underscores instead of dashes. Using alternative aliases for these encodings may result in slower execution.
.. versionchanged:: 3.6
Optimization opportunity recognized for us-ascii. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4875b958-b183-44be-80c6-5a927d42c485 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,367 | supabase-export-v2 | 148fca325d95de99 | .. method:: reset()
Reset the encoder to the initial state. The output is discarded: call
``.encode(object, final=True)``, passing an empty byte or text string
if necessary, to reset the encoder and to get the output. | trusted_official_docs | CPython Docs | .. method:: reset()
Reset the encoder to the initial state. The output is discarded: call
``.encode(object, final=True)``, passing an empty byte or text string
if necessary, to reset the encoder and to get the output. | .. method:: reset()
Reset the encoder to the initial state. The output is discarded: call
``.encode(object, final=True)``, passing an empty byte or text string
if necessary, to reset the encoder and to get the output. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4993a06f-6353-4f58-b67f-e44e32b66da1 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,468 | supabase-export-v2 | 0ca572a9abfca73b | | LATIN SMALL LETTER I WITH DIAERESIS | RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK | INVERTED QUESTION MARK
in iso-8859-1), this increases the probability that a ``utf-8-sig`` encoding can be
correctly guessed from the byte sequence. So here the BOM is not used to be able
to determine the byte order used for generating... | trusted_official_docs | CPython Docs | | LATIN SMALL LETTER I WITH DIAERESIS | RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK | INVERTED QUESTION MARK
in iso-8859-1), this increases the probability that a ``utf-8-sig`` encoding can be
correctly guessed from the byte sequence. So here the BOM is not used to be able
to determine the byte order used for generating... | | LATIN SMALL LETTER I WITH DIAERESIS | RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK | INVERTED QUESTION MARK
in iso-8859-1), this increases the probability that a ``utf-8-sig`` encoding can be
correctly guessed from the byte sequence. So here the BOM is not used to be able
to determine the byte order used for generating... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4d08a13d-cd87-4b6c-ba05-f8c2e433aaa6 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,314 | supabase-export-v2 | 9a3404391ada43a9 | except :exc:`UnicodeDecodeError` or :exc:`UnicodeTranslateError` will be passed to the handler and that the replacement from the error handler will be put into the output directly.
Previously registered error handlers (including the standard error handlers)
can be looked up by name: | trusted_official_docs | CPython Docs | except :exc:`UnicodeDecodeError` or :exc:`UnicodeTranslateError` will be passed to the handler and that the replacement from the error handler will be put into the output directly.
Previously registered error handlers (including the standard error handlers)
can be looked up by name: | except :exc:`UnicodeDecodeError` or :exc:`UnicodeTranslateError` will be passed to the handler and that the replacement from the error handler will be put into the output directly.
Previously registered error handlers (including the standard error handlers)
can be looked up by name: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4df1f7a5-6419-4132-b889-098ddc43c6bd | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,298 | supabase-export-v2 | ea1eeb4cb798446c | the | | | ``'surrogateescape'`` error handler is used | | | when encoding the data. (See :pep:`383` for | | | more.) | +-------------------------+-----------------------------------------------+
.. index::
pair: xmlcharrefreplace; error handler's name
pair: namereplace; error handler's name
single: \N; escape sequen... | trusted_official_docs | CPython Docs | the | | | ``'surrogateescape'`` error handler is used | | | when encoding the data. (See :pep:`383` for | | | more.) | +-------------------------+-----------------------------------------------+
.. index::
pair: xmlcharrefreplace; error handler's name
pair: namereplace; error handler's name
single: \N; escape sequen... | the | | | ``'surrogateescape'`` error handler is used | | | when encoding the data. (See :pep:`383` for | | | more.) | +-------------------------+-----------------------------------------------+
.. index::
pair: xmlcharrefreplace; error handler's name
pair: namereplace; error handler's name
single: \N; escape sequen... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4f4cb701-0eb4-4959-840b-5738e2ecd609 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,486 | supabase-export-v2 | f51845c040286d8b | cp1026 | ibm1026 | Turkish | +-----------------+--------------------------------+--------------------------------+ | cp1125 | 1125, ibm1125, cp866u, ruscii | Ukrainian | | | | | | | | ..
versionadded:: 3.4 |
+-----------------+--------------------------------+--------------------------------+
| cp1140 | ibm1140 | Weste... | trusted_official_docs | CPython Docs | cp1026 | ibm1026 | Turkish | +-----------------+--------------------------------+--------------------------------+ | cp1125 | 1125, ibm1125, cp866u, ruscii | Ukrainian | | | | | | | | ..
versionadded:: 3.4 |
+-----------------+--------------------------------+--------------------------------+
| cp1140 | ibm1140 | Weste... | cp1026 | ibm1026 | Turkish | +-----------------+--------------------------------+--------------------------------+ | cp1125 | 1125, ibm1125, cp866u, ruscii | Ukrainian | | | | | | | | ..
versionadded:: 3.4 |
+-----------------+--------------------------------+--------------------------------+
| cp1140 | ibm1140 | Weste... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4fc3ce7b-c941-4c2a-b9a4-6a3b72bc873e | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,467 | supabase-export-v2 | 49b4efea3bdd1aaf | sequence: ``0xef``, ``0xbb``, ``0xbf``) is written. As it's rather improbable that any charmap encoded file starts with these byte values (which would e.g. map to
| LATIN SMALL LETTER I WITH DIAERESIS
| RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
| INVERTED QUESTION MARK | trusted_official_docs | CPython Docs | sequence: ``0xef``, ``0xbb``, ``0xbf``) is written. As it's rather improbable that any charmap encoded file starts with these byte values (which would e.g. map to
| LATIN SMALL LETTER I WITH DIAERESIS
| RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
| INVERTED QUESTION MARK | sequence: ``0xef``, ``0xbb``, ``0xbf``) is written. As it's rather improbable that any charmap encoded file starts with these byte values (which would e.g. map to
| LATIN SMALL LETTER I WITH DIAERESIS
| RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
| INVERTED QUESTION MARK | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
503e63ec-3314-457e-9bf6-10c7a45836dc | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,558 | supabase-export-v2 | 78991a2154621117 | and :mod:`ftplib`, accept Unicode host names (:mod:`http.client` then also transparently sends an IDNA hostname in the :mailheader:`Host` field if it sends that field at all).
When receiving host names from the wire (such as in reverse name lookup), no
automatic conversion to Unicode is performed: applications wishing ... | trusted_official_docs | CPython Docs | and :mod:`ftplib`, accept Unicode host names (:mod:`http.client` then also transparently sends an IDNA hostname in the :mailheader:`Host` field if it sends that field at all).
When receiving host names from the wire (such as in reverse name lookup), no
automatic conversion to Unicode is performed: applications wishing ... | and :mod:`ftplib`, accept Unicode host names (:mod:`http.client` then also transparently sends an IDNA hostname in the :mailheader:`Host` field if it sends that field at all).
When receiving host names from the wire (such as in reverse name lookup), no
automatic conversion to Unicode is performed: applications wishing ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
52ea38bb-77d2-4814-82de-6a4f1ac43479 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,476 | supabase-export-v2 | 89c99b26321a1598 | .. impl-detail::
Some common encodings can bypass the codecs lookup machinery to
improve performance. These optimization opportunities are only
recognized by CPython for a limited set of (case insensitive)
aliases: utf-8, utf8, latin-1, latin1, iso-8859-1, iso8859-1, mbcs
(Windows only), ascii, us-ascii, utf-16, ut... | trusted_official_docs | CPython Docs | .. impl-detail::
Some common encodings can bypass the codecs lookup machinery to
improve performance. These optimization opportunities are only
recognized by CPython for a limited set of (case insensitive)
aliases: utf-8, utf8, latin-1, latin1, iso-8859-1, iso8859-1, mbcs
(Windows only), ascii, us-ascii, utf-16, ut... | .. impl-detail::
Some common encodings can bypass the codecs lookup machinery to
improve performance. These optimization opportunities are only
recognized by CPython for a limited set of (case insensitive)
aliases: utf-8, utf8, latin-1, latin1, iso-8859-1, iso8859-1, mbcs
(Windows only), ascii, us-ascii, utf-16, ut... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
52fe7e1a-b677-46fd-bd3b-b27cf3116237 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,365 | supabase-export-v2 | b61d497fc09db203 | .. method:: encode(object, final=False)
Encodes *object* (taking the current state of the encoder into account)
and returns the resulting encoded object. If this is the last call to
:meth:`encode` *final* must be true (the default is false). | trusted_official_docs | CPython Docs | .. method:: encode(object, final=False)
Encodes *object* (taking the current state of the encoder into account)
and returns the resulting encoded object. If this is the last call to
:meth:`encode` *final* must be true (the default is false). | .. method:: encode(object, final=False)
Encodes *object* (taking the current state of the encoder into account)
and returns the resulting encoded object. If this is the last call to
:meth:`encode` *final* must be true (the default is false). | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
56b30bf4-9a6e-4499-a9c3-f9dd1e0fa782 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,530 | supabase-export-v2 | ef938425315122ab | Meaning | +====================+=========+===========================+ | rot_13 | rot13 | Return the Caesar-cypher | | | | encryption of the | | | | operand. | +--------------------+---------+---------------------------+
.. versionadded:: 3.2
Restoration of the ``rot_13`` text transform. | trusted_official_docs | CPython Docs | Meaning | +====================+=========+===========================+ | rot_13 | rot13 | Return the Caesar-cypher | | | | encryption of the | | | | operand. | +--------------------+---------+---------------------------+
.. versionadded:: 3.2
Restoration of the ``rot_13`` text transform. | Meaning | +====================+=========+===========================+ | rot_13 | rot13 | Return the Caesar-cypher | | | | encryption of the | | | | operand. | +--------------------+---------+---------------------------+
.. versionadded:: 3.2
Restoration of the ``rot_13`` text transform. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5c4c5cc0-9333-45ef-9dd6-2e7e0a80d7db | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,276 | supabase-export-v2 | ceabb76349a0437a | the codec accept :class:`bytes` objects to decode. Therefore it does not support text-to-text encoders such as ``rot_13``, although ``rot_13`` may be used equivalently with :func:`iterencode`.
.. function:: readbuffer_encode(buffer, errors=None, /) | trusted_official_docs | CPython Docs | the codec accept :class:`bytes` objects to decode. Therefore it does not support text-to-text encoders such as ``rot_13``, although ``rot_13`` may be used equivalently with :func:`iterencode`.
.. function:: readbuffer_encode(buffer, errors=None, /) | the codec accept :class:`bytes` objects to decode. Therefore it does not support text-to-text encoders such as ``rot_13``, although ``rot_13`` may be used equivalently with :func:`iterencode`.
.. function:: readbuffer_encode(buffer, errors=None, /) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5ca28a8f-25be-4e7c-acff-393f4c267b3d | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,313 | supabase-export-v2 | 016655cba129d076 | be treated as being relative to the end of the input string. If the resulting position is out of bound an :exc:`IndexError` will be raised.
Decoding and translating works similarly, except :exc:`UnicodeDecodeError` or
:exc:`UnicodeTranslateError` will be passed to the handler and that the
replacement from the error h... | trusted_official_docs | CPython Docs | be treated as being relative to the end of the input string. If the resulting position is out of bound an :exc:`IndexError` will be raised.
Decoding and translating works similarly, except :exc:`UnicodeDecodeError` or
:exc:`UnicodeTranslateError` will be passed to the handler and that the
replacement from the error h... | be treated as being relative to the end of the input string. If the resulting position is out of bound an :exc:`IndexError` will be raised.
Decoding and translating works similarly, except :exc:`UnicodeDecodeError` or
:exc:`UnicodeTranslateError` will be passed to the handler and that the
replacement from the error h... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5e69ebdf-75fb-47dd-aae5-ef54fcf1cfc2 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,348 | supabase-export-v2 | 25ac7f7b3509e8aa | .. method:: decode(input, errors='strict')
Decodes the object *input* and returns a tuple (output object, length
consumed). For instance, for a :term:`text encoding`, decoding converts
a bytes object encoded using a particular
character set encoding to a string object. | trusted_official_docs | CPython Docs | .. method:: decode(input, errors='strict')
Decodes the object *input* and returns a tuple (output object, length
consumed). For instance, for a :term:`text encoding`, decoding converts
a bytes object encoded using a particular
character set encoding to a string object. | .. method:: decode(input, errors='strict')
Decodes the object *input* and returns a tuple (output object, length
consumed). For instance, for a :term:`text encoding`, decoding converts
a bytes object encoded using a particular
character set encoding to a string object. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
60b933c3-1005-428f-8bfa-70ebc538aa05 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,337 | supabase-export-v2 | a246712c843be26f | Implements the ``'namereplace'`` error handling (for encoding within :term:`text encoding` only).
The unencodable character is replaced by a ``\N{...}`` escape sequence. The
set of characters that appear in the braces is the Name property from
Unicode Character Database. For example, the German lowercase letter ``'ß'... | trusted_official_docs | CPython Docs | Implements the ``'namereplace'`` error handling (for encoding within :term:`text encoding` only).
The unencodable character is replaced by a ``\N{...}`` escape sequence. The
set of characters that appear in the braces is the Name property from
Unicode Character Database. For example, the German lowercase letter ``'ß'... | Implements the ``'namereplace'`` error handling (for encoding within :term:`text encoding` only).
The unencodable character is replaced by a ``\N{...}`` escape sequence. The
set of characters that appear in the braces is the Name property from
Unicode Character Database. For example, the German lowercase letter ``'ß'... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
634dc89e-d76c-46f1-a7ef-d6676e33818b | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,441 | supabase-export-v2 | d7c1a3008f758967 | or classes providing the :class:`StreamReader` and :class:`StreamWriter` interface resp. Error handling is done in the same way as defined for the stream readers and writers.
:class:`StreamReaderWriter` instances define the combined interfaces of
:class:`StreamReader` and :class:`StreamWriter` classes. They inherit all... | trusted_official_docs | CPython Docs | or classes providing the :class:`StreamReader` and :class:`StreamWriter` interface resp. Error handling is done in the same way as defined for the stream readers and writers.
:class:`StreamReaderWriter` instances define the combined interfaces of
:class:`StreamReader` and :class:`StreamWriter` classes. They inherit all... | or classes providing the :class:`StreamReader` and :class:`StreamWriter` interface resp. Error handling is done in the same way as defined for the stream readers and writers.
:class:`StreamReaderWriter` instances define the combined interfaces of
:class:`StreamReader` and :class:`StreamWriter` classes. They inherit all... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
65f90e1b-15f8-494e-9065-b46984e6af33 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,213 | supabase-export-v2 | 750528c7e4419fdb | .. function:: charmap_build(string)
Return a mapping suitable for encoding with a custom single-byte encoding. Given a :class:`str` *string* of up to 256 characters representing a
decoding table, returns either a compact internal mapping object
``EncodingMap`` or a :class:`dictionary <dict>` mapping character ordinal... | trusted_official_docs | CPython Docs | .. function:: charmap_build(string)
Return a mapping suitable for encoding with a custom single-byte encoding. Given a :class:`str` *string* of up to 256 characters representing a
decoding table, returns either a compact internal mapping object
``EncodingMap`` or a :class:`dictionary <dict>` mapping character ordinal... | .. function:: charmap_build(string)
Return a mapping suitable for encoding with a custom single-byte encoding. Given a :class:`str` *string* of up to 256 characters representing a
decoding table, returns either a compact internal mapping object
``EncodingMap`` or a :class:`dictionary <dict>` mapping character ordinal... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
669164e2-41e9-41e0-908a-2884cb09ff96 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,214 | supabase-export-v2 | 166de93e70f62251 | table, returns either a compact internal mapping object ``EncodingMap`` or a :class:`dictionary <dict>` mapping character ordinals to byte values. Raises a :exc:`TypeError` on invalid input.
The full details for each codec can also be looked up directly: | trusted_official_docs | CPython Docs | table, returns either a compact internal mapping object ``EncodingMap`` or a :class:`dictionary <dict>` mapping character ordinals to byte values. Raises a :exc:`TypeError` on invalid input.
The full details for each codec can also be looked up directly: | table, returns either a compact internal mapping object ``EncodingMap`` or a :class:`dictionary <dict>` mapping character ordinals to byte values. Raises a :exc:`TypeError` on invalid input.
The full details for each codec can also be looked up directly: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
66ea46d5-8e1d-4454-844d-8ad1b64416d6 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,293 | supabase-export-v2 | f71d17a5b98a4118 | handler's name single: ? (question mark); replacement character single: \ (backslash); escape sequence single: \x; escape sequence single: \u; escape sequence single: \U; escape sequence
The following error handlers can be used with all Python
:ref:`standard-encodings` codecs: | trusted_official_docs | CPython Docs | handler's name single: ? (question mark); replacement character single: \ (backslash); escape sequence single: \x; escape sequence single: \u; escape sequence single: \U; escape sequence
The following error handlers can be used with all Python
:ref:`standard-encodings` codecs: | handler's name single: ? (question mark); replacement character single: \ (backslash); escape sequence single: \x; escape sequence single: \u; escape sequence single: \U; escape sequence
The following error handlers can be used with all Python
:ref:`standard-encodings` codecs: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
6c384974-14f0-4baf-85c1-a217ab30f79f | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,461 | supabase-export-v2 | d124568301766bc6 | byte sequence has been decoded into a string; as a ``ZERO WIDTH NO-BREAK SPACE`` it's a normal character that will be decoded like any other.
There's another encoding that is able to encode the full range of Unicode
characters: UTF-8. UTF-8 is an 8-bit encoding, which means there are no issues
with byte order in UTF-8.... | trusted_official_docs | CPython Docs | byte sequence has been decoded into a string; as a ``ZERO WIDTH NO-BREAK SPACE`` it's a normal character that will be decoded like any other.
There's another encoding that is able to encode the full range of Unicode
characters: UTF-8. UTF-8 is an 8-bit encoding, which means there are no issues
with byte order in UTF-8.... | byte sequence has been decoded into a string; as a ``ZERO WIDTH NO-BREAK SPACE`` it's a normal character that will be decoded like any other.
There's another encoding that is able to encode the full range of Unicode
characters: UTF-8. UTF-8 is an 8-bit encoding, which means there are no issues
with byte order in UTF-8.... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
6cd3e304-52c2-4568-bd60-5bf31fdefdc6 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,396 | supabase-export-v2 | da572ed59cd3a283 | 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 *stream* argument must be a file-like object open for writing
text or binary data, as appropriate for the specific codec. | 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 *stream* argument must be a file-like object open for writing
text or binary data, as appropriate for the specific codec. | 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 *stream* argument must be a file-like object open for writing
text or binary data, as appropriate for the specific codec. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
6e885784-5a4f-4057-adcf-41f0f8b26e4b | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,555 | supabase-export-v2 | c9ce8a2ca0dc7af2 | If you need the IDNA 2008 standard from :rfc:`5891` and :rfc:`5895`, use the third-party :pypi:`idna` module.
These RFCs together define a protocol to support non-ASCII characters in domain
names. A domain name containing non-ASCII characters (such as
``www.Alliancefrançaise.nu``) is converted into an ASCII-compatible ... | trusted_official_docs | CPython Docs | If you need the IDNA 2008 standard from :rfc:`5891` and :rfc:`5895`, use the third-party :pypi:`idna` module.
These RFCs together define a protocol to support non-ASCII characters in domain
names. A domain name containing non-ASCII characters (such as
``www.Alliancefrançaise.nu``) is converted into an ASCII-compatible ... | If you need the IDNA 2008 standard from :rfc:`5891` and :rfc:`5895`, use the third-party :pypi:`idna` module.
These RFCs together define a protocol to support non-ASCII characters in domain
names. A domain name containing non-ASCII characters (such as
``www.Alliancefrançaise.nu``) is converted into an ASCII-compatible ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
6ef6ef45-006e-4fa7-b14b-878a793435a8 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,358 | supabase-export-v2 | 371d5bb49766ba8f | IncrementalEncoder Objects ~~~~~~~~~~~~~~~~~~~~~~~~~~
The :class:`IncrementalEncoder` class is used for encoding an input in multiple
steps. It defines the following methods which every incremental encoder must
define in order to be compatible with the Python codec registry. | trusted_official_docs | CPython Docs | IncrementalEncoder Objects ~~~~~~~~~~~~~~~~~~~~~~~~~~
The :class:`IncrementalEncoder` class is used for encoding an input in multiple
steps. It defines the following methods which every incremental encoder must
define in order to be compatible with the Python codec registry. | IncrementalEncoder Objects ~~~~~~~~~~~~~~~~~~~~~~~~~~
The :class:`IncrementalEncoder` class is used for encoding an input in multiple
steps. It defines the following methods which every incremental encoder must
define in order to be compatible with the Python codec registry. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
6ef9aa64-0613-4c10-839c-a039f30b0a69 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,282 | supabase-export-v2 | 8fc60b61f8126c9c | The module also provides the following constants which are useful for reading and writing to platform dependent files:
.. data:: BOM
BOM_BE
BOM_LE
BOM_UTF8
BOM_UTF16
BOM_UTF16_BE
BOM_UTF16_LE
BOM_UTF32
BOM_UTF32_BE
BOM_UTF32_LE | trusted_official_docs | CPython Docs | The module also provides the following constants which are useful for reading and writing to platform dependent files:
.. data:: BOM
BOM_BE
BOM_LE
BOM_UTF8
BOM_UTF16
BOM_UTF16_BE
BOM_UTF16_LE
BOM_UTF32
BOM_UTF32_BE
BOM_UTF32_LE | The module also provides the following constants which are useful for reading and writing to platform dependent files:
.. data:: BOM
BOM_BE
BOM_LE
BOM_UTF8
BOM_UTF16
BOM_UTF16_BE
BOM_UTF16_LE
BOM_UTF32
BOM_UTF32_BE
BOM_UTF32_LE | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
6fae600f-4942-4fe2-b09a-ed8d7f52e439 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,219 | supabase-export-v2 | 5c2d2bdf646ad741 | .. versionchanged:: 3.9 Any characters except ASCII letters and digits and a dot are converted to underscore.
.. versionchanged:: 3.15
No characters are converted to underscore anymore. Spaces are converted to hyphens. | trusted_official_docs | CPython Docs | .. versionchanged:: 3.9 Any characters except ASCII letters and digits and a dot are converted to underscore.
.. versionchanged:: 3.15
No characters are converted to underscore anymore. Spaces are converted to hyphens. | .. versionchanged:: 3.9 Any characters except ASCII letters and digits and a dot are converted to underscore.
.. versionchanged:: 3.15
No characters are converted to underscore anymore. Spaces are converted to hyphens. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
70672a3a-5646-402e-9e26-7a98899c1fdd | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,466 | supabase-export-v2 | 0df9a9f012ab4533 | BOM is required and any ``U+FEFF`` character in the decoded string (even if it's the first character) is treated as a ``ZERO WIDTH NO-BREAK SPACE``.
Without external information it's impossible to reliably determine which
encoding was used for encoding a string. Each charmap encoding can
decode any random byte sequence... | trusted_official_docs | CPython Docs | BOM is required and any ``U+FEFF`` character in the decoded string (even if it's the first character) is treated as a ``ZERO WIDTH NO-BREAK SPACE``.
Without external information it's impossible to reliably determine which
encoding was used for encoding a string. Each charmap encoding can
decode any random byte sequence... | BOM is required and any ``U+FEFF`` character in the decoded string (even if it's the first character) is treated as a ``ZERO WIDTH NO-BREAK SPACE``.
Without external information it's impossible to reliably determine which
encoding was used for encoding a string. Each charmap encoding can
decode any random byte sequence... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7215fa28-4947-403f-8283-351419b3829b | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,349 | supabase-export-v2 | 158d4543b08fa914 | object, length consumed). For instance, for a :term:`text encoding`, decoding converts a bytes object encoded using a particular character set encoding to a string object.
For text encodings and bytes-to-bytes codecs,
*input* must be a bytes object or one which provides the read-only
buffer interface -- for example, ... | trusted_official_docs | CPython Docs | object, length consumed). For instance, for a :term:`text encoding`, decoding converts a bytes object encoded using a particular character set encoding to a string object.
For text encodings and bytes-to-bytes codecs,
*input* must be a bytes object or one which provides the read-only
buffer interface -- for example, ... | object, length consumed). For instance, for a :term:`text encoding`, decoding converts a bytes object encoded using a particular character set encoding to a string object.
For text encodings and bytes-to-bytes codecs,
*input* must be a bytes object or one which provides the read-only
buffer interface -- for example, ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7231a56a-a391-44e5-8132-a2dea5171553 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,268 | supabase-export-v2 | a3bd70b6eb3baf55 | the original file as bytes using *file_encoding*. Bytes read from the original file are decoded according to *file_encoding*, and the result is encoded using *data_encoding*.
If *file_encoding* is not given, it defaults to *data_encoding*. | trusted_official_docs | CPython Docs | the original file as bytes using *file_encoding*. Bytes read from the original file are decoded according to *file_encoding*, and the result is encoded using *data_encoding*.
If *file_encoding* is not given, it defaults to *data_encoding*. | the original file as bytes using *file_encoding*. Bytes read from the original file are decoded according to *file_encoding*, and the result is encoded using *data_encoding*.
If *file_encoding* is not given, it defaults to *data_encoding*. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
725a719b-071e-487d-b67c-9304421687fb | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,529 | supabase-export-v2 | bf486493727f77dd | .. tabularcolumns:: |l|l|L|
+--------------------+---------+---------------------------+
| Codec | Aliases | Meaning |
+====================+=========+===========================+
| rot_13 | rot13 | Return the Caesar-cypher |
| | | encryption of the |
| | | operand. |
+--------------------+---------+-------------------... | trusted_official_docs | CPython Docs | .. tabularcolumns:: |l|l|L|
+--------------------+---------+---------------------------+
| Codec | Aliases | Meaning |
+====================+=========+===========================+
| rot_13 | rot13 | Return the Caesar-cypher |
| | | encryption of the |
| | | operand. |
+--------------------+---------+-------------------... | .. tabularcolumns:: |l|l|L|
+--------------------+---------+---------------------------+
| Codec | Aliases | Meaning |
+====================+=========+===========================+
| rot_13 | rot13 | Return the Caesar-cypher |
| | | encryption of the |
| | | operand. |
+--------------------+---------+-------------------... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
75ab9fd8-5648-4285-b096-e03916b8eeca | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,363 | supabase-export-v2 | dfc122e1d9a7bcac | The :class:`IncrementalEncoder` may implement different error handling schemes by providing the *errors* keyword argument. See :ref:`error-handlers` for possible values.
The *errors* argument will be assigned to an attribute of the same name. Assigning to this attribute makes it possible to switch between different err... | trusted_official_docs | CPython Docs | The :class:`IncrementalEncoder` may implement different error handling schemes by providing the *errors* keyword argument. See :ref:`error-handlers` for possible values.
The *errors* argument will be assigned to an attribute of the same name. Assigning to this attribute makes it possible to switch between different err... | The :class:`IncrementalEncoder` may implement different error handling schemes by providing the *errors* keyword argument. See :ref:`error-handlers` for possible values.
The *errors* argument will be assigned to an attribute of the same name. Assigning to this attribute makes it possible to switch between different err... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7a29e19c-0348-4991-b49f-ff4bf9809c46 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,455 | supabase-export-v2 | b184c4f7bb0e838b | Encodings and Unicode ---------------------
Strings are stored internally as sequences of code points in
range ``U+0000``--``U+10FFFF``. (See :pep:`393` for
more details about the implementation.)
Once a string object is used outside of CPU and memory, endianness
and how these arrays are stored as bytes become an issue... | trusted_official_docs | CPython Docs | Encodings and Unicode ---------------------
Strings are stored internally as sequences of code points in
range ``U+0000``--``U+10FFFF``. (See :pep:`393` for
more details about the implementation.)
Once a string object is used outside of CPU and memory, endianness
and how these arrays are stored as bytes become an issue... | Encodings and Unicode ---------------------
Strings are stored internally as sequences of code points in
range ``U+0000``--``U+10FFFF``. (See :pep:`393` for
more details about the implementation.)
Once a string object is used outside of CPU and memory, endianness
and how these arrays are stored as bytes become an issue... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7b28a3b6-5e44-4a8a-8da4-16ca87ee0a47 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,378 | supabase-export-v2 | 29e9b8f10f09899f | 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:`IncrementalDecoder` 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:`IncrementalDecoder` 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:`IncrementalDecoder` 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 | |
7b9755e0-78c1-4d5a-9878-3d66872f513d | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,559 | supabase-export-v2 | 2087119328f49e28 | reverse name lookup), no automatic conversion to Unicode is performed: applications wishing to present such host names to the user should decode them to Unicode.
The module :mod:`!encodings.idna` also implements the nameprep procedure, which
performs certain normalizations on host names, to achieve case-insensitivity o... | trusted_official_docs | CPython Docs | reverse name lookup), no automatic conversion to Unicode is performed: applications wishing to present such host names to the user should decode them to Unicode.
The module :mod:`!encodings.idna` also implements the nameprep procedure, which
performs certain normalizations on host names, to achieve case-insensitivity o... | reverse name lookup), no automatic conversion to Unicode is performed: applications wishing to present such host names to the user should decode them to Unicode.
The module :mod:`!encodings.idna` also implements the nameprep procedure, which
performs certain normalizations on host names, to achieve case-insensitivity o... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7bdf12aa-0aec-418a-8a7d-5016e701befe | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,450 | supabase-export-v2 | c266dfe9d0e175d9 | The *stream* argument must be a file-like object.
The *encode* and *decode* arguments must
adhere to the :class:`Codec` interface. *Reader* and
*Writer* must be factory functions or classes providing objects of the
:class:`StreamReader` and :class:`StreamWriter` interface respectively. | trusted_official_docs | CPython Docs | The *stream* argument must be a file-like object.
The *encode* and *decode* arguments must
adhere to the :class:`Codec` interface. *Reader* and
*Writer* must be factory functions or classes providing objects of the
:class:`StreamReader` and :class:`StreamWriter` interface respectively. | The *stream* argument must be a file-like object.
The *encode* and *decode* arguments must
adhere to the :class:`Codec` interface. *Reader* and
*Writer* must be factory functions or classes providing objects of the
:class:`StreamReader` and :class:`StreamWriter` interface respectively. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7bf71a1f-e639-4b7b-9fe6-53b674b92cf9 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,419 | supabase-export-v2 | 8ab15fbdc99a3150 | Decodes data from the stream and returns the resulting object.
The *chars* argument indicates the number of decoded
code points 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. | trusted_official_docs | CPython Docs | Decodes data from the stream and returns the resulting object.
The *chars* argument indicates the number of decoded
code points 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. | Decodes data from the stream and returns the resulting object.
The *chars* argument indicates the number of decoded
code points 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. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
80eb833a-b406-4be1-a06c-c2583f95cdae | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,434 | supabase-export-v2 | d8b5db51cabc6c70 | Note that no stream repositioning should take place. This method is primarily intended to be able to recover from decoding errors.
In addition to the above methods, the :class:`StreamReader` must also inherit
all other methods and attributes from the underlying stream. | trusted_official_docs | CPython Docs | Note that no stream repositioning should take place. This method is primarily intended to be able to recover from decoding errors.
In addition to the above methods, the :class:`StreamReader` must also inherit
all other methods and attributes from the underlying stream. | Note that no stream repositioning should take place. This method is primarily intended to be able to recover from decoding errors.
In addition to the above methods, the :class:`StreamReader` must also inherit
all other methods and attributes from the underlying stream. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
826a3005-87ba-4512-baf0-51db302915f3 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,305 | supabase-export-v2 | 12ef802f49f55159 | Otherwise these codecs treat | | | | the presence of surrogate code point in | | | | :class:`str` as an error. | +-------------------+------------------------+-------------------------------------------+
.. versionadded:: 3.1
The ``'surrogateescape'`` and ``'surrogatepass'`` error handlers. | trusted_official_docs | CPython Docs | Otherwise these codecs treat | | | | the presence of surrogate code point in | | | | :class:`str` as an error. | +-------------------+------------------------+-------------------------------------------+
.. versionadded:: 3.1
The ``'surrogateescape'`` and ``'surrogatepass'`` error handlers. | Otherwise these codecs treat | | | | the presence of surrogate code point in | | | | :class:`str` as an error. | +-------------------+------------------------+-------------------------------------------+
.. versionadded:: 3.1
The ``'surrogateescape'`` and ``'surrogatepass'`` error handlers. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
833ce071-d266-44ef-afeb-8bd3b50fbe16 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,287 | supabase-export-v2 | 6739ac83fe38c434 | 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.
Each codec has to define four interfaces to make it usable as codec in Python:
stateless encoder, stateless decoder, stream reader and stream writer. The
stream reader and ... | trusted_official_docs | CPython Docs | 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.
Each codec has to define four interfaces to make it usable as codec in Python:
stateless encoder, stateless decoder, stream reader and stream writer. The
stream reader and ... | 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.
Each codec has to define four interfaces to make it usable as codec in Python:
stateless encoder, stateless decoder, stream reader and stream writer. The
stream reader and ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
83de4fca-55f2-42ab-9fcf-1940b9577d8d | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,478 | supabase-export-v2 | 40d30676910b9c18 | .. versionchanged:: 3.6 Optimization opportunity recognized for us-ascii.
Many of the character sets support the same languages. They vary in individual
characters (e.g. whether the EURO SIGN is supported or not), and in the
assignment of characters to code positions. For the European languages in
particular, the follo... | trusted_official_docs | CPython Docs | .. versionchanged:: 3.6 Optimization opportunity recognized for us-ascii.
Many of the character sets support the same languages. They vary in individual
characters (e.g. whether the EURO SIGN is supported or not), and in the
assignment of characters to code positions. For the European languages in
particular, the follo... | .. versionchanged:: 3.6 Optimization opportunity recognized for us-ascii.
Many of the character sets support the same languages. They vary in individual
characters (e.g. whether the EURO SIGN is supported or not), and in the
assignment of characters to code positions. For the European languages in
particular, the follo... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
84210d35-882f-429a-af16-cc338ab5c36d | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,502 | supabase-export-v2 | a3616fcc9ddab5a3 | | | | | Beware that Python source | | | | code actually uses UTF-8 | | | | by default. | +--------------------+---------+---------------------------+
.. versionchanged:: 3.8
"unicode_internal" codec is removed. | trusted_official_docs | CPython Docs | | | | | Beware that Python source | | | | code actually uses UTF-8 | | | | by default. | +--------------------+---------+---------------------------+
.. versionchanged:: 3.8
"unicode_internal" codec is removed. | | | | | Beware that Python source | | | | code actually uses UTF-8 | | | | by default. | +--------------------+---------+---------------------------+
.. versionchanged:: 3.8
"unicode_internal" codec is removed. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
86396620-1bc1-447c-80e4-8a0e8e0b56b4 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,508 | supabase-export-v2 | e7fb313a18cc7456 | | | | result always includes a | | | | | trailing ``'\n'``). | | | | | | | | | | ..
versionchanged:: 3.4 | |
| | | accepts any | |
| | | :term:`bytes-like object` | |
| | | as input for encoding and | |
| | | decoding | |
+----------------------+------------------+------------------------------+------------------------... | trusted_official_docs | CPython Docs | | | | result always includes a | | | | | trailing ``'\n'``). | | | | | | | | | | ..
versionchanged:: 3.4 | |
| | | accepts any | |
| | | :term:`bytes-like object` | |
| | | as input for encoding and | |
| | | decoding | |
+----------------------+------------------+------------------------------+------------------------... | | | | result always includes a | | | | | trailing ``'\n'``). | | | | | | | | | | ..
versionchanged:: 3.4 | |
| | | accepts any | |
| | | :term:`bytes-like object` | |
| | | as input for encoding and | |
| | | decoding | |
+----------------------+------------------+------------------------------+------------------------... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
86ca67fa-4819-446b-b373-eeececefa7d0 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,538 | supabase-export-v2 | 93f32026cd35319a | used for Python package names are collapsed and replaced with a single underscore, leading and trailing underscores are removed. For example, ``' -;#'`` becomes ``'_'``.
Note that *encoding* should be ASCII only. | trusted_official_docs | CPython Docs | used for Python package names are collapsed and replaced with a single underscore, leading and trailing underscores are removed. For example, ``' -;#'`` becomes ``'_'``.
Note that *encoding* should be ASCII only. | used for Python package names are collapsed and replaced with a single underscore, leading and trailing underscores are removed. For example, ``' -;#'`` becomes ``'_'``.
Note that *encoding* should be ASCII only. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
877be3a8-3ed7-4a27-b93b-8cc86160b196 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,250 | supabase-export-v2 | a8f5f56ffbb76a89 | .. function:: register(search_function, /)
Register a codec search function. Search functions are expected to take one
argument, being the encoding name in all lower case letters with spaces
converted to hyphens, and return a :class:`CodecInfo` object. In case a search function cannot find a given encoding, it should... | trusted_official_docs | CPython Docs | .. function:: register(search_function, /)
Register a codec search function. Search functions are expected to take one
argument, being the encoding name in all lower case letters with spaces
converted to hyphens, and return a :class:`CodecInfo` object. In case a search function cannot find a given encoding, it should... | .. function:: register(search_function, /)
Register a codec search function. Search functions are expected to take one
argument, being the encoding name in all lower case letters with spaces
converted to hyphens, and return a :class:`CodecInfo` object. In case a search function cannot find a given encoding, it should... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
890bb505-fda0-4c3c-8b0a-9124ac5ed1ba | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,445 | supabase-export-v2 | 0770910ef80fd62e | The :class:`StreamRecoder` translates data from one encoding to another, which is sometimes useful when dealing with different encoding environments.
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:`StreamRecoder` translates data from one encoding to another, which is sometimes useful when dealing with different encoding environments.
The design is such that one can use the factory functions returned by the
:func:`lookup` function to construct the instance. | The :class:`StreamRecoder` translates data from one encoding to another, which is sometimes useful when dealing with different encoding environments.
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 | |
8918f27b-8bce-4536-837f-3b727a3ca25a | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,471 | supabase-export-v2 | 376cf7e5ebfd5bfe | Standard Encodings ------------------
Python comes with a number of codecs built-in, either implemented as C functions
or with dictionaries as mapping tables. The following table lists the codecs by
name, together with a few common aliases, and the languages for which the
encoding is likely used. Neither the list of al... | trusted_official_docs | CPython Docs | Standard Encodings ------------------
Python comes with a number of codecs built-in, either implemented as C functions
or with dictionaries as mapping tables. The following table lists the codecs by
name, together with a few common aliases, and the languages for which the
encoding is likely used. Neither the list of al... | Standard Encodings ------------------
Python comes with a number of codecs built-in, either implemented as C functions
or with dictionaries as mapping tables. The following table lists the codecs by
name, together with a few common aliases, and the languages for which the
encoding is likely used. Neither the list of al... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8d8c7241-28f1-4cad-842c-d558e9ee4774 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,283 | supabase-export-v2 | 535d9ed190f0ed3a | .. data:: BOM BOM_BE BOM_LE BOM_UTF8 BOM_UTF16 BOM_UTF16_BE BOM_UTF16_LE BOM_UTF32 BOM_UTF32_BE BOM_UTF32_LE
These constants define various byte sequences,
being Unicode byte order marks (BOMs) for several encodings. They are
used in UTF-16 and UTF-32 data streams to indicate the byte order used,
and in UTF-8 as a U... | trusted_official_docs | CPython Docs | .. data:: BOM BOM_BE BOM_LE BOM_UTF8 BOM_UTF16 BOM_UTF16_BE BOM_UTF16_LE BOM_UTF32 BOM_UTF32_BE BOM_UTF32_LE
These constants define various byte sequences,
being Unicode byte order marks (BOMs) for several encodings. They are
used in UTF-16 and UTF-32 data streams to indicate the byte order used,
and in UTF-8 as a U... | .. data:: BOM BOM_BE BOM_LE BOM_UTF8 BOM_UTF16 BOM_UTF16_BE BOM_UTF16_LE BOM_UTF32 BOM_UTF32_BE BOM_UTF32_LE
These constants define various byte sequences,
being Unicode byte order marks (BOMs) for several encodings. They are
used in UTF-16 and UTF-32 data streams to indicate the byte order used,
and in UTF-8 as a U... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8df53a9e-0c22-439a-81b2-b860f87ebc20 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,451 | supabase-export-v2 | 92ab7dc7231e84f4 | arguments must adhere to the :class:`Codec` interface. *Reader* and *Writer* must be factory functions or classes providing objects of the :class:`StreamReader` and :class:`StreamWriter` interface respectively.
Error handling is done in the same way as defined for the stream readers and
writers. | trusted_official_docs | CPython Docs | arguments must adhere to the :class:`Codec` interface. *Reader* and *Writer* must be factory functions or classes providing objects of the :class:`StreamReader` and :class:`StreamWriter` interface respectively.
Error handling is done in the same way as defined for the stream readers and
writers. | arguments must adhere to the :class:`Codec` interface. *Reader* and *Writer* must be factory functions or classes providing objects of the :class:`StreamReader` and :class:`StreamWriter` interface respectively.
Error handling is done in the same way as defined for the stream readers and
writers. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8f6ed923-5d6a-4290-93e5-b9e8193bdfcc | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,490 | supabase-export-v2 | 8a6f8d373cfa74d8 | encoders no longer allow surrogate code points (``U+D800``--``U+DFFF``) to be encoded. The utf-32\* decoders no longer decode byte sequences that correspond to surrogate code points.
.. versionchanged:: 3.8
``cp65001`` is now an alias to ``utf_8``. | trusted_official_docs | CPython Docs | encoders no longer allow surrogate code points (``U+D800``--``U+DFFF``) to be encoded. The utf-32\* decoders no longer decode byte sequences that correspond to surrogate code points.
.. versionchanged:: 3.8
``cp65001`` is now an alias to ``utf_8``. | encoders no longer allow surrogate code points (``U+D800``--``U+DFFF``) to be encoded. The utf-32\* decoders no longer decode byte sequences that correspond to surrogate code points.
.. versionchanged:: 3.8
``cp65001`` is now an alias to ``utf_8``. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9005beb6-7d19-499c-9fc9-e222df3fb396 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,542 | supabase-export-v2 | d6a3ce474e024513 | Search for the codec module corresponding to the given encoding name *encoding*.
This function first normalizes the *encoding* using
:func:`normalize_encoding`, then looks for a corresponding alias. It attempts to import a codec module from the encodings package using either
the alias or the normalized name. If the m... | trusted_official_docs | CPython Docs | Search for the codec module corresponding to the given encoding name *encoding*.
This function first normalizes the *encoding* using
:func:`normalize_encoding`, then looks for a corresponding alias. It attempts to import a codec module from the encodings package using either
the alias or the normalized name. If the m... | Search for the codec module corresponding to the given encoding name *encoding*.
This function first normalizes the *encoding* using
:func:`normalize_encoding`, then looks for a corresponding alias. It attempts to import a codec module from the encodings package using either
the alias or the normalized name. If the m... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
917561e4-62d1-4e5d-acf9-7ba6fe563c3c | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,238 | supabase-export-v2 | 28b3a0288abdcc57 | Look up the codec for the given encoding and return its incremental encoder class or factory function.
Raises a :exc:`LookupError` in case the encoding cannot be found or the codec
doesn't support an incremental encoder. | trusted_official_docs | CPython Docs | Look up the codec for the given encoding and return its incremental encoder class or factory function.
Raises a :exc:`LookupError` in case the encoding cannot be found or the codec
doesn't support an incremental encoder. | Look up the codec for the given encoding and return its incremental encoder class or factory function.
Raises a :exc:`LookupError` in case the encoding cannot be found or the codec
doesn't support an incremental encoder. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
91eb7978-df16-47e0-9191-98f406c84210 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,275 | supabase-export-v2 | 153d24b20be17887 | yield :class:`bytes` objects. This function is a :term:`generator`. The *errors* argument (as well as any other keyword argument) is passed through to the incremental decoder.
This function requires that the codec accept :class:`bytes` objects
to decode. Therefore it does not support text-to-text encoders such as
``r... | trusted_official_docs | CPython Docs | yield :class:`bytes` objects. This function is a :term:`generator`. The *errors* argument (as well as any other keyword argument) is passed through to the incremental decoder.
This function requires that the codec accept :class:`bytes` objects
to decode. Therefore it does not support text-to-text encoders such as
``r... | yield :class:`bytes` objects. This function is a :term:`generator`. The *errors* argument (as well as any other keyword argument) is passed through to the incremental decoder.
This function requires that the codec accept :class:`bytes` objects
to decode. Therefore it does not support text-to-text encoders such as
``r... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
93076333-dacd-4370-b5a8-552104c94300 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,229 | supabase-export-v2 | 2d293f8e989e3d0f | reader classes or factory functions. These have to provide the interface defined by the base classes :class:`StreamWriter` and :class:`StreamReader`, respectively. Stream codecs can maintain state.
To simplify access to the various codec components, the module provides
these additional functions which use :func:`lookup... | trusted_official_docs | CPython Docs | reader classes or factory functions. These have to provide the interface defined by the base classes :class:`StreamWriter` and :class:`StreamReader`, respectively. Stream codecs can maintain state.
To simplify access to the various codec components, the module provides
these additional functions which use :func:`lookup... | reader classes or factory functions. These have to provide the interface defined by the base classes :class:`StreamWriter` and :class:`StreamReader`, respectively. Stream codecs can maintain state.
To simplify access to the various codec components, the module provides
these additional functions which use :func:`lookup... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
93d714b6-3cf0-467c-b9ef-0d47feacf288 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,311 | supabase-export-v2 | b4e2206d6fef1f7c | .. function:: register_error(name, error_handler, /)
Register the error handling function *error_handler* under the name *name*. The *error_handler* argument will be called during encoding and decoding
in case of an error, when *name* is specified as the errors parameter. | trusted_official_docs | CPython Docs | .. function:: register_error(name, error_handler, /)
Register the error handling function *error_handler* under the name *name*. The *error_handler* argument will be called during encoding and decoding
in case of an error, when *name* is specified as the errors parameter. | .. function:: register_error(name, error_handler, /)
Register the error handling function *error_handler* under the name *name*. The *error_handler* argument will be called during encoding and decoding
in case of an error, when *name* is specified as the errors parameter. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9424b6f6-36d1-4a30-bfde-c1a823fa9cd1 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,385 | supabase-export-v2 | b883e1e37893a0ec | .. method:: getstate()
Return the current state of the decoder. This must be a tuple with two
items, the first must be the buffer containing the still undecoded
input. The second must be an integer and can be additional state
info. (The implementation should make sure that ``0`` is the most common
additional state ... | trusted_official_docs | CPython Docs | .. method:: getstate()
Return the current state of the decoder. This must be a tuple with two
items, the first must be the buffer containing the still undecoded
input. The second must be an integer and can be additional state
info. (The implementation should make sure that ``0`` is the most common
additional state ... | .. method:: getstate()
Return the current state of the decoder. This must be a tuple with two
items, the first must be the buffer containing the still undecoded
input. The second must be an integer and can be additional state
info. (The implementation should make sure that ``0`` is the most common
additional state ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9534dc79-69d4-48a8-80a8-f41959d5553d | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,459 | supabase-export-v2 | 2b4c74d5ceefd786 | prevailing platform practice, so native-endian data round-trips without redundant byte swapping, even though the Unicode Standard defaults to big-endian when the byte order is unspecified.
When these bytes are read by a CPU with a different endianness,
the bytes have to be swapped. To be able to detect the endianness o... | trusted_official_docs | CPython Docs | prevailing platform practice, so native-endian data round-trips without redundant byte swapping, even though the Unicode Standard defaults to big-endian when the byte order is unspecified.
When these bytes are read by a CPU with a different endianness,
the bytes have to be swapped. To be able to detect the endianness o... | prevailing platform practice, so native-endian data round-trips without redundant byte swapping, even though the Unicode Standard defaults to big-endian when the byte order is unspecified.
When these bytes are read by a CPU with a different endianness,
the bytes have to be swapped. To be able to detect the endianness o... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9c92ad29-8d1d-4125-8d7f-bb635e2c330f | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,267 | supabase-export-v2 | e946c9b28ac0fb22 | 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.
Data written to the wrapped file is decoded according to the given
*data_encoding* and then written to the original file as bytes using
*file_en... | trusted_official_docs | CPython Docs | 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.
Data written to the wrapped file is decoded according to the given
*data_encoding* and then written to the original file as bytes using
*file_en... | 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.
Data written to the wrapped file is decoded according to the given
*data_encoding* and then written to the original file as bytes using
*file_en... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9d4b584b-86a5-435b-83d9-a9402bd0d324 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,241 | supabase-export-v2 | b04bf2a43ca8eb9e | Look up the codec for the given encoding and return its incremental decoder class or factory function.
Raises a :exc:`LookupError` in case the encoding cannot be found or the codec
doesn't support an incremental decoder. | trusted_official_docs | CPython Docs | Look up the codec for the given encoding and return its incremental decoder class or factory function.
Raises a :exc:`LookupError` in case the encoding cannot be found or the codec
doesn't support an incremental decoder. | Look up the codec for the given encoding and return its incremental decoder class or factory function.
Raises a :exc:`LookupError` in case the encoding cannot be found or the codec
doesn't support an incremental decoder. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9ea2341b-55b2-40d3-bc3f-d336b59a9f78 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,209 | supabase-export-v2 | cd21307d86d81fbb | meaning that encoding errors raise :exc:`ValueError` (or a more codec specific subclass, such as :exc:`UnicodeEncodeError`). Refer to :ref:`codec-base-classes` for more information on codec error handling.
.. function:: decode(obj, encoding='utf-8', errors='strict') | trusted_official_docs | CPython Docs | meaning that encoding errors raise :exc:`ValueError` (or a more codec specific subclass, such as :exc:`UnicodeEncodeError`). Refer to :ref:`codec-base-classes` for more information on codec error handling.
.. function:: decode(obj, encoding='utf-8', errors='strict') | meaning that encoding errors raise :exc:`ValueError` (or a more codec specific subclass, such as :exc:`UnicodeEncodeError`). Refer to :ref:`codec-base-classes` for more information on codec error handling.
.. function:: decode(obj, encoding='utf-8', errors='strict') | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9f0c303c-7351-4bd9-80b2-66cdd893ecc2 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,301 | supabase-export-v2 | ea574072812b4a77 | | Replace with ``\N{...}`` escape sequences, | | | what appears in the braces is the Name | | | property from Unicode Character Database.
|
| | Implemented in :func:`namereplace_errors`. |
+-------------------------+-----------------------------------------------+ | trusted_official_docs | CPython Docs | | Replace with ``\N{...}`` escape sequences, | | | what appears in the braces is the Name | | | property from Unicode Character Database.
|
| | Implemented in :func:`namereplace_errors`. |
+-------------------------+-----------------------------------------------+ | | Replace with ``\N{...}`` escape sequences, | | | what appears in the braces is the Name | | | property from Unicode Character Database.
|
| | Implemented in :func:`namereplace_errors`. |
+-------------------------+-----------------------------------------------+ | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9f83ecf7-cf56-4e77-92dd-9275442ca35f | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,343 | supabase-export-v2 | cfe58d58d9cf5cfc | .. method:: encode(input, errors='strict')
Encodes the object *input* and returns a tuple (output object, length consumed). For instance, :term:`text encoding` converts
a string object to a bytes object using a particular
character set encoding (e.g., ``cp1252`` or ``iso-8859-1``). | trusted_official_docs | CPython Docs | .. method:: encode(input, errors='strict')
Encodes the object *input* and returns a tuple (output object, length consumed). For instance, :term:`text encoding` converts
a string object to a bytes object using a particular
character set encoding (e.g., ``cp1252`` or ``iso-8859-1``). | .. method:: encode(input, errors='strict')
Encodes the object *input* and returns a tuple (output object, length consumed). For instance, :term:`text encoding` converts
a string object to a bytes object using a particular
character set encoding (e.g., ``cp1252`` or ``iso-8859-1``). | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9fdd47b7-9825-4f91-866d-f91b938782b8 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,300 | supabase-export-v2 | b8f691963f120ed3 | The following error handlers are only applicable to encoding (within :term:`text encodings <text encoding>`):
+-------------------------+-----------------------------------------------+
| Value | Meaning |
+=========================+===============================================+
| ``'xmlcharrefreplace'`` | Replace wi... | trusted_official_docs | CPython Docs | The following error handlers are only applicable to encoding (within :term:`text encodings <text encoding>`):
+-------------------------+-----------------------------------------------+
| Value | Meaning |
+=========================+===============================================+
| ``'xmlcharrefreplace'`` | Replace wi... | The following error handlers are only applicable to encoding (within :term:`text encodings <text encoding>`):
+-------------------------+-----------------------------------------------+
| Value | Meaning |
+=========================+===============================================+
| ``'xmlcharrefreplace'`` | Replace wi... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a0658fc7-ed68-4173-9d61-29aeaf5030ee | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,430 | supabase-export-v2 | bbd21405a8a27ad0 | Line-endings are implemented using the codec's :meth:`decode` method and are included in the list entries if *keepends* is true.
*sizehint*, if given, is passed as the *size* argument to the stream's
:meth:`read` method. | trusted_official_docs | CPython Docs | Line-endings are implemented using the codec's :meth:`decode` method and are included in the list entries if *keepends* is true.
*sizehint*, if given, is passed as the *size* argument to the stream's
:meth:`read` method. | Line-endings are implemented using the codec's :meth:`decode` method and are included in the list entries if *keepends* is true.
*sizehint*, if given, is passed as the *size* argument to the stream's
:meth:`read` method. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a176512d-30cf-4f29-88b0-1c6da45873f3 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,458 | supabase-export-v2 | 07640f5528985f39 | encoding that is used primarily on Windows). There's a string constant with 256 characters that shows you which character is mapped to which byte value.
All of these encodings can only encode 256 of the 1114112 code points
defined in Unicode. A simple and straightforward way that can store each Unicode
code point, is t... | trusted_official_docs | CPython Docs | encoding that is used primarily on Windows). There's a string constant with 256 characters that shows you which character is mapped to which byte value.
All of these encodings can only encode 256 of the 1114112 code points
defined in Unicode. A simple and straightforward way that can store each Unicode
code point, is t... | encoding that is used primarily on Windows). There's a string constant with 256 characters that shows you which character is mapped to which byte value.
All of these encodings can only encode 256 of the 1114112 code points
defined in Unicode. A simple and straightforward way that can store each Unicode
code point, is t... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a533a230-41ef-445f-817c-22c4b94c9985 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,463 | supabase-export-v2 | 2cb48d619fcfc7d3 | 0xxxxxxx | +-----------------------------------+----------------------------------------------+ | ``U-00000080`` ... ``U-000007FF`` | 110xxxxx 10xxxxxx | +-----------------------------------+----------------------------------------------+ | ``U-00000800`` ... ``U-0000FFFF`` | 1110xxxx 10xxxxxx 10xxxxxx | +-------------... | trusted_official_docs | CPython Docs | 0xxxxxxx | +-----------------------------------+----------------------------------------------+ | ``U-00000080`` ... ``U-000007FF`` | 110xxxxx 10xxxxxx | +-----------------------------------+----------------------------------------------+ | ``U-00000800`` ... ``U-0000FFFF`` | 1110xxxx 10xxxxxx 10xxxxxx | +-------------... | 0xxxxxxx | +-----------------------------------+----------------------------------------------+ | ``U-00000080`` ... ``U-000007FF`` | 110xxxxx 10xxxxxx | +-----------------------------------+----------------------------------------------+ | ``U-00000800`` ... ``U-0000FFFF`` | 1110xxxx 10xxxxxx 10xxxxxx | +-------------... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a85b0d30-23ac-4f48-9bd1-899ae6ba8c76 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,304 | supabase-export-v2 | 403254c53e333362 | In addition, the following error handler is specific to the given codecs:
+-------------------+------------------------+-------------------------------------------+
| Value | Codecs | Meaning |
+===================+========================+===========================================+
|``'surrogatepass'``| utf-8, utf-16... | trusted_official_docs | CPython Docs | In addition, the following error handler is specific to the given codecs:
+-------------------+------------------------+-------------------------------------------+
| Value | Codecs | Meaning |
+===================+========================+===========================================+
|``'surrogatepass'``| utf-8, utf-16... | In addition, the following error handler is specific to the given codecs:
+-------------------+------------------------+-------------------------------------------+
| Value | Codecs | Meaning |
+===================+========================+===========================================+
|``'surrogatepass'``| utf-8, utf-16... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a90120ce-b114-43bb-907a-cfb817858f2f | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,413 | supabase-export-v2 | 9e95eaff732d7c43 | 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 *stream* argument must be a file-like object open for reading
text or binary data, as appropriate for the specific codec. | 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 *stream* argument must be a file-like object open for reading
text or binary data, as appropriate for the specific codec. | 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 *stream* argument must be a file-like object open for reading
text or binary data, as appropriate for the specific codec. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a94381af-e441-43d5-a2f3-047fbe91e0ad | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,537 | supabase-export-v2 | d5615093f28e68c0 | Normalize encoding name *encoding*.
Normalization works as follows: all non-alphanumeric characters except the
dot used for Python package names are collapsed and replaced with a single
underscore, leading and trailing underscores are removed. For example, ``' -;#'`` becomes ``'_'``. | trusted_official_docs | CPython Docs | Normalize encoding name *encoding*.
Normalization works as follows: all non-alphanumeric characters except the
dot used for Python package names are collapsed and replaced with a single
underscore, leading and trailing underscores are removed. For example, ``' -;#'`` becomes ``'_'``. | Normalize encoding name *encoding*.
Normalization works as follows: all non-alphanumeric characters except the
dot used for Python package names are collapsed and replaced with a single
underscore, leading and trailing underscores are removed. For example, ``' -;#'`` becomes ``'_'``. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a9e45322-b3bf-47a0-87a4-0554fca6d867 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,354 | supabase-export-v2 | 7eb2956f3aef6982 | Incremental Encoding and Decoding ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The :class:`IncrementalEncoder` and :class:`IncrementalDecoder` classes provide
the basic interface for incremental encoding and decoding. Encoding/decoding the
input isn't done with one call to the stateless encoder/decoder function, but
with multiple... | trusted_official_docs | CPython Docs | Incremental Encoding and Decoding ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The :class:`IncrementalEncoder` and :class:`IncrementalDecoder` classes provide
the basic interface for incremental encoding and decoding. Encoding/decoding the
input isn't done with one call to the stateless encoder/decoder function, but
with multiple... | Incremental Encoding and Decoding ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The :class:`IncrementalEncoder` and :class:`IncrementalDecoder` classes provide
the basic interface for incremental encoding and decoding. Encoding/decoding the
input isn't done with one call to the stateless encoder/decoder function, but
with multiple... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
aab40071-8859-4309-a569-054a7b0562d6 | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,398 | supabase-export-v2 | 57490cfe99829e23 | 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 | |
ab0ee6ec-765f-47f0-80da-5f0bc153620f | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,392 | supabase-export-v2 | bbe6dddea0e28a99 | StreamWriter Objects ~~~~~~~~~~~~~~~~~~~~
The :class:`StreamWriter` class is a subclass of :class:`Codec` and defines the
following methods which every stream writer must define in order to be
compatible with the Python codec registry. | trusted_official_docs | CPython Docs | StreamWriter Objects ~~~~~~~~~~~~~~~~~~~~
The :class:`StreamWriter` class is a subclass of :class:`Codec` and defines the
following methods which every stream writer must define in order to be
compatible with the Python codec registry. | StreamWriter Objects ~~~~~~~~~~~~~~~~~~~~
The :class:`StreamWriter` class is a subclass of :class:`Codec` and defines the
following methods which every stream writer must define in order to be
compatible with the Python codec registry. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
abd87793-83e0-4580-82eb-a8184dbfb1ba | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,557 | supabase-export-v2 | a85ac1ba6107d771 | Unicode host names to ACE, so that applications need not be concerned about converting host names themselves when they pass them to the socket module.
On top of that, modules that have host names as function
parameters, such as :mod:`http.client` and :mod:`ftplib`, accept Unicode host
names (:mod:`http.client` then als... | trusted_official_docs | CPython Docs | Unicode host names to ACE, so that applications need not be concerned about converting host names themselves when they pass them to the socket module.
On top of that, modules that have host names as function
parameters, such as :mod:`http.client` and :mod:`ftplib`, accept Unicode host
names (:mod:`http.client` then als... | Unicode host names to ACE, so that applications need not be concerned about converting host names themselves when they pass them to the socket module.
On top of that, modules that have host names as function
parameters, such as :mod:`http.client` and :mod:`ftplib`, accept Unicode host
names (:mod:`http.client` then als... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
abee28c5-0957-4c5f-8cf5-60850e83bfea | CPython Docs | file://datasets/cpython/Doc/library/codecs.rst | unknown | 3e420f97-233c-496e-a921-94cd1be6c850 | 20,485 | supabase-export-v2 | 8b98b4ac0138fc67 | cp037 | IBM037, IBM039 | English | +-----------------+--------------------------------+--------------------------------+ | cp273 | 273, IBM273, csIBM273 | German | | | | | | | | ..
versionadded:: 3.4 |
+-----------------+--------------------------------+--------------------------------+
| cp424 | EBCDIC-CP-HE, IBM424 |... | trusted_official_docs | CPython Docs | cp037 | IBM037, IBM039 | English | +-----------------+--------------------------------+--------------------------------+ | cp273 | 273, IBM273, csIBM273 | German | | | | | | | | ..
versionadded:: 3.4 |
+-----------------+--------------------------------+--------------------------------+
| cp424 | EBCDIC-CP-HE, IBM424 |... | cp037 | IBM037, IBM039 | English | +-----------------+--------------------------------+--------------------------------+ | cp273 | 273, IBM273, csIBM273 | German | | | | | | | | ..
versionadded:: 3.4 |
+-----------------+--------------------------------+--------------------------------+
| cp424 | EBCDIC-CP-HE, IBM424 |... | 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.