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
64c8eafe-87b6-4c9d-bff0-e461a090bc24
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,822
supabase-export-v2
d1883284f8562bb3
.. index:: pair: object; sequence The operations in the following table are supported by most sequence types, both mutable and immutable. The :class:`collections.abc.Sequence` ABC is provided to make it easier to correctly implement these operations on custom sequence types.
trusted_official_docs
CPython Docs
.. index:: pair: object; sequence The operations in the following table are supported by most sequence types, both mutable and immutable. The :class:`collections.abc.Sequence` ABC is provided to make it easier to correctly implement these operations on custom sequence types.
.. index:: pair: object; sequence The operations in the following table are supported by most sequence types, both mutable and immutable. The :class:`collections.abc.Sequence` ABC is provided to make it easier to correctly implement these operations on custom sequence types.
python, official-docs, cpython, P0
Local_Trusted_Corpus
65c5576f-6fba-4133-9afc-ab6be42479df
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,710
supabase-export-v2
cc19f058d00b1482
.. method:: cast(format, /) cast(format, shape, /) Cast a memoryview to a new format or shape. *shape* defaults to ``[byte_length//new_itemsize]``, which means that the result view will be one-dimensional. The return value is a new memoryview, but the buffer itself is not copied. Supported casts are 1D -> C-:term:`c...
trusted_official_docs
CPython Docs
.. method:: cast(format, /) cast(format, shape, /) Cast a memoryview to a new format or shape. *shape* defaults to ``[byte_length//new_itemsize]``, which means that the result view will be one-dimensional. The return value is a new memoryview, but the buffer itself is not copied. Supported casts are 1D -> C-:term:`c...
.. method:: cast(format, /) cast(format, shape, /) Cast a memoryview to a new format or shape. *shape* defaults to ``[byte_length//new_itemsize]``, which means that the result view will be one-dimensional. The return value is a new memoryview, but the buffer itself is not copied. Supported casts are 1D -> C-:term:`c...
python, official-docs, cpython, P0
Local_Trusted_Corpus
65d20463-85ac-4070-be70-1380ceaf9a71
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,648
supabase-export-v2
e1b40934ca3883f0
behavior of the :keyword:`is` and :keyword:`is not` operators cannot be customized; also they can be applied to any two objects and never raise an exception. .. index:: pair: operator; in pair: operator; not in
trusted_official_docs
CPython Docs
behavior of the :keyword:`is` and :keyword:`is not` operators cannot be customized; also they can be applied to any two objects and never raise an exception. .. index:: pair: operator; in pair: operator; not in
behavior of the :keyword:`is` and :keyword:`is not` operators cannot be customized; also they can be applied to any two objects and never raise an exception. .. index:: pair: operator; in pair: operator; not in
python, official-docs, cpython, P0
Local_Trusted_Corpus
68b8a4dd-4045-48bd-83b4-4e3ba6eb1d17
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,572
supabase-export-v2
8eedd1c1d472f2a5
The bytearray version of this method does *not* operate in place - it always produces a new object, even if no changes were made. .. index:: single: universal newlines; bytes.splitlines method single: universal newlines; bytearray.splitlines method
trusted_official_docs
CPython Docs
The bytearray version of this method does *not* operate in place - it always produces a new object, even if no changes were made. .. index:: single: universal newlines; bytes.splitlines method single: universal newlines; bytearray.splitlines method
The bytearray version of this method does *not* operate in place - it always produces a new object, even if no changes were made. .. index:: single: universal newlines; bytes.splitlines method single: universal newlines; bytearray.splitlines method
python, official-docs, cpython, P0
Local_Trusted_Corpus
69ae276b-09ef-44ab-9c1c-9c0d4b31dd64
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,158
supabase-export-v2
ffb1dd54f6e81162
.. method:: str.rsplit(sep=None, maxsplit=-1) Return a list of the words in the string, using *sep* as the delimiter string. If *maxsplit* is given, at most *maxsplit* splits are done, the *rightmost* ones. If *sep* is not specified or ``None``, any whitespace string is a separator. Except for splitting from the righ...
trusted_official_docs
CPython Docs
.. method:: str.rsplit(sep=None, maxsplit=-1) Return a list of the words in the string, using *sep* as the delimiter string. If *maxsplit* is given, at most *maxsplit* splits are done, the *rightmost* ones. If *sep* is not specified or ``None``, any whitespace string is a separator. Except for splitting from the righ...
.. method:: str.rsplit(sep=None, maxsplit=-1) Return a list of the words in the string, using *sep* as the delimiter string. If *maxsplit* is given, at most *maxsplit* splits are done, the *rightmost* ones. If *sep* is not specified or ``None``, any whitespace string is a separator. Except for splitting from the righ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
69dd877a-0f5a-4963-9c76-4af9ced54486
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,285
supabase-export-v2
fa5cc60c25b36659
A conversion specifier contains two or more characters and has the following components, which must occur in this order: #. The ``'%'`` character, which marks the start of the specifier.
trusted_official_docs
CPython Docs
A conversion specifier contains two or more characters and has the following components, which must occur in this order: #. The ``'%'`` character, which marks the start of the specifier.
A conversion specifier contains two or more characters and has the following components, which must occur in this order: #. The ``'%'`` character, which marks the start of the specifier.
python, official-docs, cpython, P0
Local_Trusted_Corpus
6a9b4d68-0898-450a-bcf0-5819d12dbead
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,021
supabase-export-v2
d8b236ad702be4d9
be used only if you need to know the position of *sub*. To check if *sub* is a substring or not, use the :keyword:`in` operator:: >>> 'Py' in 'Python' True
trusted_official_docs
CPython Docs
be used only if you need to know the position of *sub*. To check if *sub* is a substring or not, use the :keyword:`in` operator:: >>> 'Py' in 'Python' True
be used only if you need to know the position of *sub*. To check if *sub* is a substring or not, use the :keyword:`in` operator:: >>> 'Py' in 'Python' True
python, official-docs, cpython, P0
Local_Trusted_Corpus
6bf598e4-9227-4c9e-8602-31db825423b3
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,663
supabase-export-v2
5d88dd97907121f7
x + complex(u, v) = complex(x + u, v) x * complex(u, v) = complex(x * u, x * v) A comparison between numbers of different types behaves as though the exact values of those numbers were being compared. [2]_
trusted_official_docs
CPython Docs
x + complex(u, v) = complex(x + u, v) x * complex(u, v) = complex(x * u, x * v) A comparison between numbers of different types behaves as though the exact values of those numbers were being compared. [2]_
x + complex(u, v) = complex(x + u, v) x * complex(u, v) = complex(x * u, x * v) A comparison between numbers of different types behaves as though the exact values of those numbers were being compared. [2]_
python, official-docs, cpython, P0
Local_Trusted_Corpus
6c2fb5e5-45ba-4da1-9769-c7fe5aeca99b
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,901
supabase-export-v2
84753ff90917c15c
items with commas: ``[a]``, ``[a, b, c]`` * Using a list comprehension: ``[x for x in iterable]`` * Using the type constructor: ``list()`` or ``list(iterable)`` The constructor builds a list whose items are the same and in the same order as *iterable*'s items. *iterable* may be either a sequence, a container that sup...
trusted_official_docs
CPython Docs
items with commas: ``[a]``, ``[a, b, c]`` * Using a list comprehension: ``[x for x in iterable]`` * Using the type constructor: ``list()`` or ``list(iterable)`` The constructor builds a list whose items are the same and in the same order as *iterable*'s items. *iterable* may be either a sequence, a container that sup...
items with commas: ``[a]``, ``[a, b, c]`` * Using a list comprehension: ``[x for x in iterable]`` * Using the type constructor: ``list()`` or ``list(iterable)`` The constructor builds a list whose items are the same and in the same order as *iterable*'s items. *iterable* may be either a sequence, a container that sup...
python, official-docs, cpython, P0
Local_Trusted_Corpus
6c7c132e-2f7b-4ecb-90ef-6e564f4b3711
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,670
supabase-export-v2
eb2e08d9caf619a9
Notes: (1) Also referred to as integer division. For operands of type :class:`int`, the result has type :class:`int`. For operands of type :class:`float`, the result has type :class:`float`. In general, the result is a whole integer, though the result's type is not necessarily :class:`int`. The result is always ro...
trusted_official_docs
CPython Docs
Notes: (1) Also referred to as integer division. For operands of type :class:`int`, the result has type :class:`int`. For operands of type :class:`float`, the result has type :class:`float`. In general, the result is a whole integer, though the result's type is not necessarily :class:`int`. The result is always ro...
Notes: (1) Also referred to as integer division. For operands of type :class:`int`, the result has type :class:`int`. For operands of type :class:`float`, the result has type :class:`float`. In general, the result is a whole integer, though the result's type is not necessarily :class:`int`. The result is always ro...
python, official-docs, cpython, P0
Local_Trusted_Corpus
6d752463-0b1a-4a5c-bb6c-d0f8c0a9e668
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,631
supabase-export-v2
03ead0c7fbc11af1
These are the Boolean operations, ordered by ascending priority: +-------------+---------------------------------+-------+ | Operation | Result | Notes | +=============+=================================+=======+ | ``x or y`` | if *x* is true, then *x*, else | \(1) | | | *y* | | +-------------+--------------------------...
trusted_official_docs
CPython Docs
These are the Boolean operations, ordered by ascending priority: +-------------+---------------------------------+-------+ | Operation | Result | Notes | +=============+=================================+=======+ | ``x or y`` | if *x* is true, then *x*, else | \(1) | | | *y* | | +-------------+--------------------------...
These are the Boolean operations, ordered by ascending priority: +-------------+---------------------------------+-------+ | Operation | Result | Notes | +=============+=================================+=======+ | ``x or y`` | if *x* is true, then *x*, else | \(1) | | | *y* | | +-------------+--------------------------...
python, official-docs, cpython, P0
Local_Trusted_Corpus
6eb75676-f2f1-4478-9fa1-46a57f7b23ac
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,618
supabase-export-v2
c84a41d0e1f55fbc
.. index:: pair: statement; if pair: statement; while pair: truth; value pair: Boolean; operations single: false Any object can be tested for truth value, for use in an :keyword:`if` or :keyword:`while` condition or as operand of the Boolean operations below.
trusted_official_docs
CPython Docs
.. index:: pair: statement; if pair: statement; while pair: truth; value pair: Boolean; operations single: false Any object can be tested for truth value, for use in an :keyword:`if` or :keyword:`while` condition or as operand of the Boolean operations below.
.. index:: pair: statement; if pair: statement; while pair: truth; value pair: Boolean; operations single: false Any object can be tested for truth value, for use in an :keyword:`if` or :keyword:`while` condition or as operand of the Boolean operations below.
python, official-docs, cpython, P0
Local_Trusted_Corpus
6f1e0941-c054-49a4-a863-2ae8b451a8a4
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,313
supabase-export-v2
03c1d094592b73ca
The precision determines the number of significant digits before and after the decimal point and defaults to 6. (5) If precision is ``N``, the output is truncated to ``N`` characters.
trusted_official_docs
CPython Docs
The precision determines the number of significant digits before and after the decimal point and defaults to 6. (5) If precision is ``N``, the output is truncated to ``N`` characters.
The precision determines the number of significant digits before and after the decimal point and defaults to 6. (5) If precision is ``N``, the output is truncated to ``N`` characters.
python, official-docs, cpython, P0
Local_Trusted_Corpus
6f5adc03-d92b-4359-b1e6-fe5ddc9c1646
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,616
supabase-export-v2
cc8bbca1fcbae94a
(such as failing to display tuples and dictionaries correctly). If the value being printed may be a tuple or dictionary, wrap it in a tuple. Bytes objects (``bytes``/``bytearray``) have one unique built-in operation: the ``%`` operator (modulo). This is also known as the bytes *formatting* or *interpolation* operator. ...
trusted_official_docs
CPython Docs
(such as failing to display tuples and dictionaries correctly). If the value being printed may be a tuple or dictionary, wrap it in a tuple. Bytes objects (``bytes``/``bytearray``) have one unique built-in operation: the ``%`` operator (modulo). This is also known as the bytes *formatting* or *interpolation* operator. ...
(such as failing to display tuples and dictionaries correctly). If the value being printed may be a tuple or dictionary, wrap it in a tuple. Bytes objects (``bytes``/``bytearray``) have one unique built-in operation: the ``%`` operator (modulo). This is also known as the bytes *formatting* or *interpolation* operator. ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
6f81f3ae-e6d0-4de9-83ce-b0420f3e9670
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,832
supabase-export-v2
cdd970cd99fc4610
used only for simple containment testing in the general case, some specialised sequences (such as :class:`str`, :class:`bytes` and :class:`bytearray`) also use them for subsequence testing:: >>> "gg" in "eggs" True
trusted_official_docs
CPython Docs
used only for simple containment testing in the general case, some specialised sequences (such as :class:`str`, :class:`bytes` and :class:`bytearray`) also use them for subsequence testing:: >>> "gg" in "eggs" True
used only for simple containment testing in the general case, some specialised sequences (such as :class:`str`, :class:`bytes` and :class:`bytearray`) also use them for subsequence testing:: >>> "gg" in "eggs" True
python, official-docs, cpython, P0
Local_Trusted_Corpus
7036c14f-8a4e-4733-8ae2-ba9c1f18c422
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,027
supabase-export-v2
29496c8393054958
See :ref:`formatstrings` for a description of the various formatting options that can be specified in format strings. .. note:: When formatting a number (:class:`int`, :class:`float`, :class:`complex`, :class:`decimal.Decimal` and subclasses) with the ``n`` type (ex: ``'{:n}'.format(1234)``), the function temporaril...
trusted_official_docs
CPython Docs
See :ref:`formatstrings` for a description of the various formatting options that can be specified in format strings. .. note:: When formatting a number (:class:`int`, :class:`float`, :class:`complex`, :class:`decimal.Decimal` and subclasses) with the ``n`` type (ex: ``'{:n}'.format(1234)``), the function temporaril...
See :ref:`formatstrings` for a description of the various formatting options that can be specified in format strings. .. note:: When formatting a number (:class:`int`, :class:`float`, :class:`complex`, :class:`decimal.Decimal` and subclasses) with the ``n`` type (ex: ``'{:n}'.format(1234)``), the function temporaril...
python, official-docs, cpython, P0
Local_Trusted_Corpus
70399da7-7a4c-49f3-8528-17d98264d8c7
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,759
supabase-export-v2
b52ec3ecfa3080c5
[sign] ['0x'] integer ['.' fraction] ['p' exponent] where the optional ``sign`` may by either ``+`` or ``-``, ``integer`` and ``fraction`` are strings of hexadecimal digits, and ``exponent`` is a decimal integer with an optional leading sign. Case is not significant, and there must be at least one hexadecimal digit in ...
trusted_official_docs
CPython Docs
[sign] ['0x'] integer ['.' fraction] ['p' exponent] where the optional ``sign`` may by either ``+`` or ``-``, ``integer`` and ``fraction`` are strings of hexadecimal digits, and ``exponent`` is a decimal integer with an optional leading sign. Case is not significant, and there must be at least one hexadecimal digit in ...
[sign] ['0x'] integer ['.' fraction] ['p' exponent] where the optional ``sign`` may by either ``+`` or ``-``, ``integer`` and ``fraction`` are strings of hexadecimal digits, and ``exponent`` is a decimal integer with an optional leading sign. Case is not significant, and there must be at least one hexadecimal digit in ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
70abee82-b071-4f3c-8e4d-ff1904eb93a1
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,689
supabase-export-v2
5b7040c82214aa44
to the flattened list representation with all elements converted to bytes. :meth:`tobytes` supports all format strings, including those that are not in :mod:`struct` module syntax. .. versionadded:: 3.8 *order* can be {'C', 'F', 'A'}. When *order* is 'C' or 'F', the data of the original array is converted to C or For...
trusted_official_docs
CPython Docs
to the flattened list representation with all elements converted to bytes. :meth:`tobytes` supports all format strings, including those that are not in :mod:`struct` module syntax. .. versionadded:: 3.8 *order* can be {'C', 'F', 'A'}. When *order* is 'C' or 'F', the data of the original array is converted to C or For...
to the flattened list representation with all elements converted to bytes. :meth:`tobytes` supports all format strings, including those that are not in :mod:`struct` module syntax. .. versionadded:: 3.8 *order* can be {'C', 'F', 'A'}. When *order* is 'C' or 'F', the data of the original array is converted to C or For...
python, official-docs, cpython, P0
Local_Trusted_Corpus
71419abe-81eb-4f2e-8757-592cb17b1d65
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,861
supabase-export-v2
0384ad78b2c9ba1c
.. index:: triple: immutable; sequence; types pair: object; tuple pair: built-in function; hash The only operation that immutable sequence types generally implement that is not also implemented by mutable sequence types is support for the :func:`hash` built-in.
trusted_official_docs
CPython Docs
.. index:: triple: immutable; sequence; types pair: object; tuple pair: built-in function; hash The only operation that immutable sequence types generally implement that is not also implemented by mutable sequence types is support for the :func:`hash` built-in.
.. index:: triple: immutable; sequence; types pair: object; tuple pair: built-in function; hash The only operation that immutable sequence types generally implement that is not also implemented by mutable sequence types is support for the :func:`hash` built-in.
python, official-docs, cpython, P0
Local_Trusted_Corpus
71893c03-cca6-4a50-8b81-f37b7a183e46
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,490
supabase-export-v2
6df1573503af8491
.. method:: bytes.lstrip(bytes=None, /) bytearray.lstrip(bytes=None, /) Return a copy of the sequence with specified leading bytes removed. The *bytes* argument is a binary sequence specifying the set of byte values to be removed. If omitted or ``None``, the *bytes* argument defaults to removing ASCII whitespace. Th...
trusted_official_docs
CPython Docs
.. method:: bytes.lstrip(bytes=None, /) bytearray.lstrip(bytes=None, /) Return a copy of the sequence with specified leading bytes removed. The *bytes* argument is a binary sequence specifying the set of byte values to be removed. If omitted or ``None``, the *bytes* argument defaults to removing ASCII whitespace. Th...
.. method:: bytes.lstrip(bytes=None, /) bytearray.lstrip(bytes=None, /) Return a copy of the sequence with specified leading bytes removed. The *bytes* argument is a binary sequence specifying the set of byte values to be removed. If omitted or ``None``, the *bytes* argument defaults to removing ASCII whitespace. Th...
python, official-docs, cpython, P0
Local_Trusted_Corpus
71b8fd26-28fb-4973-90dd-ad00b0b0472f
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,661
supabase-export-v2
a93e4565b29ef1b2
a complex or a floating-point number, the other is converted to a floating-point number; * otherwise, both must be integers and no conversion is necessary. Arithmetic with complex and real operands is defined by the usual mathematical formula, for example::
trusted_official_docs
CPython Docs
a complex or a floating-point number, the other is converted to a floating-point number; * otherwise, both must be integers and no conversion is necessary. Arithmetic with complex and real operands is defined by the usual mathematical formula, for example::
a complex or a floating-point number, the other is converted to a floating-point number; * otherwise, both must be integers and no conversion is necessary. Arithmetic with complex and real operands is defined by the usual mathematical formula, for example::
python, official-docs, cpython, P0
Local_Trusted_Corpus
71c95b0d-80c5-480b-9cce-631071d65803
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,048
supabase-export-v2
83778165ccf0e5c2
.. method:: str.isascii() Return ``True`` if the string is empty or all characters in the string are ASCII, ``False`` otherwise. ASCII characters have code points in the range U+0000-U+007F. For example:
trusted_official_docs
CPython Docs
.. method:: str.isascii() Return ``True`` if the string is empty or all characters in the string are ASCII, ``False`` otherwise. ASCII characters have code points in the range U+0000-U+007F. For example:
.. method:: str.isascii() Return ``True`` if the string is empty or all characters in the string are ASCII, ``False`` otherwise. ASCII characters have code points in the range U+0000-U+007F. For example:
python, official-docs, cpython, P0
Local_Trusted_Corpus
71e5fd79-34e4-4da4-9214-d674ef7dafff
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,339
supabase-export-v2
3d140405a8e0146a
class method returns a bytes object, decoding the given string object. The string must contain two hexadecimal digits per byte, with ASCII whitespace being ignored. >>> bytes.fromhex('2Ef0 F1f2 ') b'.\xf0\xf1\xf2'
trusted_official_docs
CPython Docs
class method returns a bytes object, decoding the given string object. The string must contain two hexadecimal digits per byte, with ASCII whitespace being ignored. >>> bytes.fromhex('2Ef0 F1f2 ') b'.\xf0\xf1\xf2'
class method returns a bytes object, decoding the given string object. The string must contain two hexadecimal digits per byte, with ASCII whitespace being ignored. >>> bytes.fromhex('2Ef0 F1f2 ') b'.\xf0\xf1\xf2'
python, official-docs, cpython, P0
Local_Trusted_Corpus
7227fabc-b645-4331-a5be-9925b9543a5e
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,646
supabase-export-v2
b4251184b6544f25
Non-identical instances of a class normally compare as non-equal unless the class defines the :meth:`~object.__eq__` method. Instances of a class cannot be ordered with respect to other instances of the same class, or other types of object, unless the class defines enough of the methods :meth:`~object.__lt__`, :meth:`~...
trusted_official_docs
CPython Docs
Non-identical instances of a class normally compare as non-equal unless the class defines the :meth:`~object.__eq__` method. Instances of a class cannot be ordered with respect to other instances of the same class, or other types of object, unless the class defines enough of the methods :meth:`~object.__lt__`, :meth:`~...
Non-identical instances of a class normally compare as non-equal unless the class defines the :meth:`~object.__eq__` method. Instances of a class cannot be ordered with respect to other instances of the same class, or other types of object, unless the class defines enough of the methods :meth:`~object.__lt__`, :meth:`~...
python, official-docs, cpython, P0
Local_Trusted_Corpus
734a5dd4-f5e2-4c39-af75-fbf14393f7e3
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,711
supabase-export-v2
d6aebe6beaa94415
one-dimensional. The return value is a new memoryview, but the buffer itself is not copied. Supported casts are 1D -> C-:term:`contiguous` and C-contiguous -> 1D. The destination format is restricted to a single element native format in :mod:`struct` syntax. One of the formats must be a byte format ('B', 'b' or 'c')....
trusted_official_docs
CPython Docs
one-dimensional. The return value is a new memoryview, but the buffer itself is not copied. Supported casts are 1D -> C-:term:`contiguous` and C-contiguous -> 1D. The destination format is restricted to a single element native format in :mod:`struct` syntax. One of the formats must be a byte format ('B', 'b' or 'c')....
one-dimensional. The return value is a new memoryview, but the buffer itself is not copied. Supported casts are 1D -> C-:term:`contiguous` and C-contiguous -> 1D. The destination format is restricted to a single element native format in :mod:`struct` syntax. One of the formats must be a byte format ('B', 'b' or 'c')....
python, official-docs, cpython, P0
Local_Trusted_Corpus
73b44c2a-eba8-412b-a5cf-e74df4feb009
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,682
supabase-export-v2
64b3d8c61da495ad
is not supported by the :mod:`struct` module, then the objects will always compare as unequal (even if the format strings and buffer contents are identical):: >>> from ctypes import BigEndianStructure, c_long >>> class BEPoint(BigEndianStructure): ... _fields_ = [("x", c_long), ("y", c_long)] ... >>> point = BEPoint...
trusted_official_docs
CPython Docs
is not supported by the :mod:`struct` module, then the objects will always compare as unequal (even if the format strings and buffer contents are identical):: >>> from ctypes import BigEndianStructure, c_long >>> class BEPoint(BigEndianStructure): ... _fields_ = [("x", c_long), ("y", c_long)] ... >>> point = BEPoint...
is not supported by the :mod:`struct` module, then the objects will always compare as unequal (even if the format strings and buffer contents are identical):: >>> from ctypes import BigEndianStructure, c_long >>> class BEPoint(BigEndianStructure): ... _fields_ = [("x", c_long), ("y", c_long)] ... >>> point = BEPoint...
python, official-docs, cpython, P0
Local_Trusted_Corpus
74235d81-e069-4d88-a8e4-e813648d6da8
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,363
supabase-export-v2
30e05c1bc5c7c86d
.. classmethod:: fromhex(string, /) This :class:`bytearray` class method returns bytearray object, decoding the given string object. The string must contain two hexadecimal digits per byte, with ASCII whitespace being ignored.
trusted_official_docs
CPython Docs
.. classmethod:: fromhex(string, /) This :class:`bytearray` class method returns bytearray object, decoding the given string object. The string must contain two hexadecimal digits per byte, with ASCII whitespace being ignored.
.. classmethod:: fromhex(string, /) This :class:`bytearray` class method returns bytearray object, decoding the given string object. The string must contain two hexadecimal digits per byte, with ASCII whitespace being ignored.
python, official-docs, cpython, P0
Local_Trusted_Corpus
74f91bbc-b953-491e-a6fe-6a4c1e9bc109
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,192
supabase-export-v2
37fcd9639a0cef6c
.. method:: str.startswith(prefix[, start[, end]]) Return ``True`` if string starts with the *prefix*, otherwise return ``False``. *prefix* can also be a tuple of prefixes to look for. With optional *start*, test string beginning at that position. With optional *end*, stop comparing string at that position.
trusted_official_docs
CPython Docs
.. method:: str.startswith(prefix[, start[, end]]) Return ``True`` if string starts with the *prefix*, otherwise return ``False``. *prefix* can also be a tuple of prefixes to look for. With optional *start*, test string beginning at that position. With optional *end*, stop comparing string at that position.
.. method:: str.startswith(prefix[, start[, end]]) Return ``True`` if string starts with the *prefix*, otherwise return ``False``. *prefix* can also be a tuple of prefixes to look for. With optional *start*, test string beginning at that position. With optional *end*, stop comparing string at that position.
python, official-docs, cpython, P0
Local_Trusted_Corpus
751b6258-d030-4679-8a1b-c5f8a0169ed6
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,444
supabase-export-v2
35ae4b0765575ea2
Like :meth:`~bytes.find`, but raise :exc:`ValueError` when the subsequence is not found. The subsequence to search for may be any :term:`bytes-like object` or an integer in the range 0 to 255.
trusted_official_docs
CPython Docs
Like :meth:`~bytes.find`, but raise :exc:`ValueError` when the subsequence is not found. The subsequence to search for may be any :term:`bytes-like object` or an integer in the range 0 to 255.
Like :meth:`~bytes.find`, but raise :exc:`ValueError` when the subsequence is not found. The subsequence to search for may be any :term:`bytes-like object` or an integer in the range 0 to 255.
python, official-docs, cpython, P0
Local_Trusted_Corpus
7549db8b-9841-436a-9522-24fae4982949
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,096
supabase-export-v2
2bf16e94f9324bc5
.. method:: str.ljust(width, fillchar=' ', /) Return the string left justified in a string of length *width*. Padding is done using the specified *fillchar* (default is an ASCII space). The original string is returned if *width* is less than or equal to ``len(s)``.
trusted_official_docs
CPython Docs
.. method:: str.ljust(width, fillchar=' ', /) Return the string left justified in a string of length *width*. Padding is done using the specified *fillchar* (default is an ASCII space). The original string is returned if *width* is less than or equal to ``len(s)``.
.. method:: str.ljust(width, fillchar=' ', /) Return the string left justified in a string of length *width*. Padding is done using the specified *fillchar* (default is an ASCII space). The original string is returned if *width* is less than or equal to ``len(s)``.
python, official-docs, cpython, P0
Local_Trusted_Corpus
757026cc-cba9-4c7d-915f-5cd5208bb74a
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,026
supabase-export-v2
1109b20e034dc61f
{b} is {answer}".format(answer=1+2, a=1, b=2) 'The sum of 1 + 2 is 3' >>> "{1} expects the {0} Inquisition!".format("Spanish", "Nobody") 'Nobody expects the Spanish Inquisition!' See :ref:`formatstrings` for a description of the various formatting options that can be specified in format strings.
trusted_official_docs
CPython Docs
{b} is {answer}".format(answer=1+2, a=1, b=2) 'The sum of 1 + 2 is 3' >>> "{1} expects the {0} Inquisition!".format("Spanish", "Nobody") 'Nobody expects the Spanish Inquisition!' See :ref:`formatstrings` for a description of the various formatting options that can be specified in format strings.
{b} is {answer}".format(answer=1+2, a=1, b=2) 'The sum of 1 + 2 is 3' >>> "{1} expects the {0} Inquisition!".format("Spanish", "Nobody") 'Nobody expects the Spanish Inquisition!' See :ref:`formatstrings` for a description of the various formatting options that can be specified in format strings.
python, official-docs, cpython, P0
Local_Trusted_Corpus
75b9436b-5dc8-4306-aaf1-ee72024515c4
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,925
supabase-export-v2
d3f2a311144ae10c
Tuples implement all of the :ref:`common <typesseq-common>` sequence operations. For heterogeneous collections of data where access by name is clearer than access by index, :func:`collections.namedtuple` may be a more appropriate choice than a simple tuple object.
trusted_official_docs
CPython Docs
Tuples implement all of the :ref:`common <typesseq-common>` sequence operations. For heterogeneous collections of data where access by name is clearer than access by index, :func:`collections.namedtuple` may be a more appropriate choice than a simple tuple object.
Tuples implement all of the :ref:`common <typesseq-common>` sequence operations. For heterogeneous collections of data where access by name is clearer than access by index, :func:`collections.namedtuple` may be a more appropriate choice than a simple tuple object.
python, official-docs, cpython, P0
Local_Trusted_Corpus
766b40eb-7c1a-4a5d-941c-1a4cc5616bf2
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,493
supabase-export-v2
70c6c6226036d2e9
any :term:`bytes-like object`. See :meth:`~bytes.removeprefix` for a method that will remove a single prefix string rather than all of a set of characters. For example:: >>> b'Arthur: three!'.lstrip(b'Arthur: ') b'ee!' >>> b'Arthur: three!'.removeprefix(b'Arthur: ') b'three!'
trusted_official_docs
CPython Docs
any :term:`bytes-like object`. See :meth:`~bytes.removeprefix` for a method that will remove a single prefix string rather than all of a set of characters. For example:: >>> b'Arthur: three!'.lstrip(b'Arthur: ') b'ee!' >>> b'Arthur: three!'.removeprefix(b'Arthur: ') b'three!'
any :term:`bytes-like object`. See :meth:`~bytes.removeprefix` for a method that will remove a single prefix string rather than all of a set of characters. For example:: >>> b'Arthur: three!'.lstrip(b'Arthur: ') b'ee!' >>> b'Arthur: three!'.removeprefix(b'Arthur: ') b'three!'
python, official-docs, cpython, P0
Local_Trusted_Corpus
767a26cb-79c6-4ee8-8c53-453245ef0156
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,907
supabase-export-v2
d4b2456d654c1352
:meth:`sort` accepts two arguments that can only be passed by keyword (:ref:`keyword-only arguments <keyword-only_parameter>`): *key* specifies a function of one argument that is used to extract a comparison key from each list element (for example, ``key=str.lower``). The key corresponding to each item in the list is ...
trusted_official_docs
CPython Docs
:meth:`sort` accepts two arguments that can only be passed by keyword (:ref:`keyword-only arguments <keyword-only_parameter>`): *key* specifies a function of one argument that is used to extract a comparison key from each list element (for example, ``key=str.lower``). The key corresponding to each item in the list is ...
:meth:`sort` accepts two arguments that can only be passed by keyword (:ref:`keyword-only arguments <keyword-only_parameter>`): *key* specifies a function of one argument that is used to extract a comparison key from each list element (for example, ``key=str.lower``). The key corresponding to each item in the list is ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
769f48e7-3690-4f42-a0ff-709a828263a0
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,530
supabase-export-v2
73c73b7bc6517704
copied.) If the current byte is an ASCII newline (``b'\n'``) or carriage return (``b'\r'``), it is copied and the current column is reset to zero. Any other byte value is copied unchanged and the current column is incremented by one regardless of how the byte value is represented when printed::
trusted_official_docs
CPython Docs
copied.) If the current byte is an ASCII newline (``b'\n'``) or carriage return (``b'\r'``), it is copied and the current column is reset to zero. Any other byte value is copied unchanged and the current column is incremented by one regardless of how the byte value is represented when printed::
copied.) If the current byte is an ASCII newline (``b'\n'``) or carriage return (``b'\r'``), it is copied and the current column is reset to zero. Any other byte value is copied unchanged and the current column is incremented by one regardless of how the byte value is represented when printed::
python, official-docs, cpython, P0
Local_Trusted_Corpus
76c84f8d-0e79-4b5b-a670-0e0b9134ce6e
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,017
supabase-export-v2
22fdef3abfd9ba08
found within the slice ``s[start:end]``. Optional arguments *start* and *end* are interpreted as in slice notation. Return ``-1`` if *sub* is not found. For example:: >>> 'spam, spam, spam'.find('sp') 0 >>> 'spam, spam, spam'.find('sp', 5) 6
trusted_official_docs
CPython Docs
found within the slice ``s[start:end]``. Optional arguments *start* and *end* are interpreted as in slice notation. Return ``-1`` if *sub* is not found. For example:: >>> 'spam, spam, spam'.find('sp') 0 >>> 'spam, spam, spam'.find('sp', 5) 6
found within the slice ``s[start:end]``. Optional arguments *start* and *end* are interpreted as in slice notation. Return ``-1`` if *sub* is not found. For example:: >>> 'spam, spam, spam'.find('sp') 0 >>> 'spam, spam, spam'.find('sp', 5) 6
python, official-docs, cpython, P0
Local_Trusted_Corpus
77443d70-ae4c-4734-b2bc-5c2476c66f3c
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,756
supabase-export-v2
5e48d806b823239e
Class method to return the float represented by a hexadecimal string *s*. The string *s* may have leading and trailing whitespace. Note that :meth:`float.hex` is an instance method, while :meth:`float.fromhex` is a class method.
trusted_official_docs
CPython Docs
Class method to return the float represented by a hexadecimal string *s*. The string *s* may have leading and trailing whitespace. Note that :meth:`float.hex` is an instance method, while :meth:`float.fromhex` is a class method.
Class method to return the float represented by a hexadecimal string *s*. The string *s* may have leading and trailing whitespace. Note that :meth:`float.hex` is an instance method, while :meth:`float.fromhex` is a class method.
python, official-docs, cpython, P0
Local_Trusted_Corpus
77874bd9-c460-4680-b439-220a74d52450
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,462
supabase-export-v2
84f854c987fb9459
*sub* is found, such that *sub* is contained within ``s[start:end]``. Optional arguments *start* and *end* are interpreted as in slice notation. Return ``-1`` on failure. The subsequence to search for may be any :term:`bytes-like object` or an integer in the range 0 to 255.
trusted_official_docs
CPython Docs
*sub* is found, such that *sub* is contained within ``s[start:end]``. Optional arguments *start* and *end* are interpreted as in slice notation. Return ``-1`` on failure. The subsequence to search for may be any :term:`bytes-like object` or an integer in the range 0 to 255.
*sub* is found, such that *sub* is contained within ``s[start:end]``. Optional arguments *start* and *end* are interpreted as in slice notation. Return ``-1`` on failure. The subsequence to search for may be any :term:`bytes-like object` or an integer in the range 0 to 255.
python, official-docs, cpython, P0
Local_Trusted_Corpus
7795c93d-6a2e-4799-a33a-6d32fc62249b
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,884
supabase-export-v2
5b4046e78a340c2d
Create a shallow copy of *sequence*. This is equivalent to writing ``sequence[:]``. .. hint:: The :meth:`!copy` method is not part of the :class:`~collections.abc.MutableSequence` :class:`~abc.ABC`, but most concrete mutable sequence types provide it.
trusted_official_docs
CPython Docs
Create a shallow copy of *sequence*. This is equivalent to writing ``sequence[:]``. .. hint:: The :meth:`!copy` method is not part of the :class:`~collections.abc.MutableSequence` :class:`~abc.ABC`, but most concrete mutable sequence types provide it.
Create a shallow copy of *sequence*. This is equivalent to writing ``sequence[:]``. .. hint:: The :meth:`!copy` method is not part of the :class:`~collections.abc.MutableSequence` :class:`~abc.ABC`, but most concrete mutable sequence types provide it.
python, official-docs, cpython, P0
Local_Trusted_Corpus
780a2422-a38f-4b58-a59c-1e5f0b209059
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,999
supabase-export-v2
f6e30c41b06c23cd
If *sub* is empty, returns the number of empty strings between characters which is the length of the string plus one. For example:: >>> 'spam, spam, spam'.count('spam') 3 >>> 'spam, spam, spam'.count('spam', 5) 2 >>> 'spam, spam, spam'.count('spam', 5, 10) 1 >>> 'spam, spam, spam'.count('eggs') 0 >>> 'spam, spa...
trusted_official_docs
CPython Docs
If *sub* is empty, returns the number of empty strings between characters which is the length of the string plus one. For example:: >>> 'spam, spam, spam'.count('spam') 3 >>> 'spam, spam, spam'.count('spam', 5) 2 >>> 'spam, spam, spam'.count('spam', 5, 10) 1 >>> 'spam, spam, spam'.count('eggs') 0 >>> 'spam, spa...
If *sub* is empty, returns the number of empty strings between characters which is the length of the string plus one. For example:: >>> 'spam, spam, spam'.count('spam') 3 >>> 'spam, spam, spam'.count('spam', 5) 2 >>> 'spam, spam, spam'.count('spam', 5, 10) 1 >>> 'spam, spam, spam'.count('eggs') 0 >>> 'spam, spa...
python, official-docs, cpython, P0
Local_Trusted_Corpus
78491394-8260-4e2b-8b87-3b4d224e73b6
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,397
supabase-export-v2
aaa2484157f868f0
.. index:: pair: bytes; methods pair: bytearray; methods Both bytes and bytearray objects support the :ref:`common <typesseq-common>` sequence operations. They interoperate not just with operands of the same type, but with any :term:`bytes-like object`. Due to this flexibility, they can be freely mixed in operations wi...
trusted_official_docs
CPython Docs
.. index:: pair: bytes; methods pair: bytearray; methods Both bytes and bytearray objects support the :ref:`common <typesseq-common>` sequence operations. They interoperate not just with operands of the same type, but with any :term:`bytes-like object`. Due to this flexibility, they can be freely mixed in operations wi...
.. index:: pair: bytes; methods pair: bytearray; methods Both bytes and bytearray objects support the :ref:`common <typesseq-common>` sequence operations. They interoperate not just with operands of the same type, but with any :term:`bytes-like object`. Due to this flexibility, they can be freely mixed in operations wi...
python, official-docs, cpython, P0
Local_Trusted_Corpus
79493b2f-7e0e-4f7a-aaf4-532a0a08b0fd
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,685
supabase-export-v2
723da564305c5d64
Bitwise Operations on Integer Types ----------------------------------- .. index:: triple: operations on; integer; types pair: bitwise; operations pair: shifting; operations pair: masking; operations pair: operator; | (vertical bar) pair: operator; ^ (caret) pair: operator; & (ampersand) pair: operator; << pai...
trusted_official_docs
CPython Docs
Bitwise Operations on Integer Types ----------------------------------- .. index:: triple: operations on; integer; types pair: bitwise; operations pair: shifting; operations pair: masking; operations pair: operator; | (vertical bar) pair: operator; ^ (caret) pair: operator; & (ampersand) pair: operator; << pai...
Bitwise Operations on Integer Types ----------------------------------- .. index:: triple: operations on; integer; types pair: bitwise; operations pair: shifting; operations pair: masking; operations pair: operator; | (vertical bar) pair: operator; ^ (caret) pair: operator; & (ampersand) pair: operator; << pai...
python, official-docs, cpython, P0
Local_Trusted_Corpus
796f8616-f45b-403e-aabe-c2a3bacc90c4
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,869
supabase-export-v2
418a6e9d1a9d7b97
meets any type and value restrictions imposed by *s* (for example, :class:`bytearray` only accepts integers that meet the value restriction ``0 <= x <= 255``). .. index:: triple: operations on; sequence; types triple: operations on; list; type pair: subscript; assignment pair: slice; assignment pair: statement; de...
trusted_official_docs
CPython Docs
meets any type and value restrictions imposed by *s* (for example, :class:`bytearray` only accepts integers that meet the value restriction ``0 <= x <= 255``). .. index:: triple: operations on; sequence; types triple: operations on; list; type pair: subscript; assignment pair: slice; assignment pair: statement; de...
meets any type and value restrictions imposed by *s* (for example, :class:`bytearray` only accepts integers that meet the value restriction ``0 <= x <= 255``). .. index:: triple: operations on; sequence; types triple: operations on; list; type pair: subscript; assignment pair: slice; assignment pair: statement; de...
python, official-docs, cpython, P0
Local_Trusted_Corpus
7a09fa6f-427c-417e-841d-982623f27509
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,480
supabase-export-v2
11e00d96cff06b7f
.. versionchanged:: 3.6 *delete* is now supported as a keyword argument. The following methods on bytes and bytearray objects have default behaviours that assume the use of ASCII compatible binary formats, but can still be used with arbitrary binary data by passing appropriate arguments. Note that all of the bytearray ...
trusted_official_docs
CPython Docs
.. versionchanged:: 3.6 *delete* is now supported as a keyword argument. The following methods on bytes and bytearray objects have default behaviours that assume the use of ASCII compatible binary formats, but can still be used with arbitrary binary data by passing appropriate arguments. Note that all of the bytearray ...
.. versionchanged:: 3.6 *delete* is now supported as a keyword argument. The following methods on bytes and bytearray objects have default behaviours that assume the use of ASCII compatible binary formats, but can still be used with arbitrary binary data by passing appropriate arguments. Note that all of the bytearray ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
7a17078d-efd1-4d99-9132-bba0816098df
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,666
supabase-export-v2
0cd4cd7da6d2146e
\(4)\(6)| :func:`float` | +---------------------+---------------------------------+---------+--------------------+ | ``complex(re, im)`` | a complex number with real part | \(6) | :func:`complex` | | | *re*, imaginary part *im*. | | | | | *im* defaults to zero.
trusted_official_docs
CPython Docs
\(4)\(6)| :func:`float` | +---------------------+---------------------------------+---------+--------------------+ | ``complex(re, im)`` | a complex number with real part | \(6) | :func:`complex` | | | *re*, imaginary part *im*. | | | | | *im* defaults to zero.
\(4)\(6)| :func:`float` | +---------------------+---------------------------------+---------+--------------------+ | ``complex(re, im)`` | a complex number with real part | \(6) | :func:`complex` | | | *re*, imaginary part *im*. | | | | | *im* defaults to zero.
python, official-docs, cpython, P0
Local_Trusted_Corpus
7a5e09b5-626f-415c-b643-fb4cd9df46d8
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,895
supabase-export-v2
14d2da7cf4aeb213
.. method:: bytearray.reverse() list.reverse() :no-contents-entry: :no-index-entry: :no-typesetting: .. method:: sequence.reverse() Reverse the items of *sequence* in place. This method maintains economy of space when reversing a large sequence. To remind users that it operates by side-effect, it returns ``None``.
trusted_official_docs
CPython Docs
.. method:: bytearray.reverse() list.reverse() :no-contents-entry: :no-index-entry: :no-typesetting: .. method:: sequence.reverse() Reverse the items of *sequence* in place. This method maintains economy of space when reversing a large sequence. To remind users that it operates by side-effect, it returns ``None``.
.. method:: bytearray.reverse() list.reverse() :no-contents-entry: :no-index-entry: :no-typesetting: .. method:: sequence.reverse() Reverse the items of *sequence* in place. This method maintains economy of space when reversing a large sequence. To remind users that it operates by side-effect, it returns ``None``.
python, official-docs, cpython, P0
Local_Trusted_Corpus
7aeed363-c5b6-4822-8f16-586484ba84f5
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,810
supabase-export-v2
0409e1e6318896bc
.. method:: iterator.__next__() Return the next item from the :term:`iterator`. If there are no further items, raise the :exc:`StopIteration` exception. This method corresponds to the :c:member:`~PyTypeObject.tp_iternext` slot of the type structure for Python objects in the Python/C API.
trusted_official_docs
CPython Docs
.. method:: iterator.__next__() Return the next item from the :term:`iterator`. If there are no further items, raise the :exc:`StopIteration` exception. This method corresponds to the :c:member:`~PyTypeObject.tp_iternext` slot of the type structure for Python objects in the Python/C API.
.. method:: iterator.__next__() Return the next item from the :term:`iterator`. If there are no further items, raise the :exc:`StopIteration` exception. This method corresponds to the :c:member:`~PyTypeObject.tp_iternext` slot of the type structure for Python objects in the Python/C API.
python, official-docs, cpython, P0
Local_Trusted_Corpus
7b15ec8d-1646-4cee-8b62-f81ea4499b01
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,909
supabase-export-v2
6700f2e5d7288a1c
The :func:`functools.cmp_to_key` utility is available to convert a 2.x style *cmp* function to a *key* function. *reverse* is a boolean value. If set to ``True``, then the list elements are sorted as if each comparison were reversed.
trusted_official_docs
CPython Docs
The :func:`functools.cmp_to_key` utility is available to convert a 2.x style *cmp* function to a *key* function. *reverse* is a boolean value. If set to ``True``, then the list elements are sorted as if each comparison were reversed.
The :func:`functools.cmp_to_key` utility is available to convert a 2.x style *cmp* function to a *key* function. *reverse* is a boolean value. If set to ``True``, then the list elements are sorted as if each comparison were reversed.
python, official-docs, cpython, P0
Local_Trusted_Corpus
7b592fae-06fa-415d-9eb0-d6f45067f1d9
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,794
supabase-export-v2
802b0007cf2825b5
.. index:: single: False single: True pair: Boolean; values The built-in function :func:`bool` converts any value to a boolean, if the value can be interpreted as a truth value (see section :ref:`truth` above).
trusted_official_docs
CPython Docs
.. index:: single: False single: True pair: Boolean; values The built-in function :func:`bool` converts any value to a boolean, if the value can be interpreted as a truth value (see section :ref:`truth` above).
.. index:: single: False single: True pair: Boolean; values The built-in function :func:`bool` converts any value to a boolean, if the value can be interpreted as a truth value (see section :ref:`truth` above).
python, official-docs, cpython, P0
Local_Trusted_Corpus
7c1894d5-ed5f-4c29-97f3-0f910644dad1
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,578
supabase-export-v2
6f2fedcaf7c017dd
*sep* is given, this method returns an empty list for the empty string, and a terminal line break does not result in an extra line:: >>> b"".split(b'\n'), b"Two lines\n".split(b'\n') ([b''], [b'Two lines', b'']) >>> b"".splitlines(), b"One line\n".splitlines() ([], [b'One line'])
trusted_official_docs
CPython Docs
*sep* is given, this method returns an empty list for the empty string, and a terminal line break does not result in an extra line:: >>> b"".split(b'\n'), b"Two lines\n".split(b'\n') ([b''], [b'Two lines', b'']) >>> b"".splitlines(), b"One line\n".splitlines() ([], [b'One line'])
*sep* is given, this method returns an empty list for the empty string, and a terminal line break does not result in an extra line:: >>> b"".split(b'\n'), b"Two lines\n".split(b'\n') ([b''], [b'Two lines', b'']) >>> b"".splitlines(), b"One line\n".splitlines() ([], [b'One line'])
python, official-docs, cpython, P0
Local_Trusted_Corpus
7d1c331c-7487-4ccd-9952-f89a67542dc9
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,275
supabase-export-v2
66597a53e76eb738
``printf``-style String Formatting ---------------------------------- .. index:: single: formatting, string (%) single: interpolation, string (%) single: string; formatting, printf single: string; interpolation, printf single: printf-style formatting single: sprintf-style formatting single: % (percent); printf-s...
trusted_official_docs
CPython Docs
``printf``-style String Formatting ---------------------------------- .. index:: single: formatting, string (%) single: interpolation, string (%) single: string; formatting, printf single: string; interpolation, printf single: printf-style formatting single: sprintf-style formatting single: % (percent); printf-s...
``printf``-style String Formatting ---------------------------------- .. index:: single: formatting, string (%) single: interpolation, string (%) single: string; formatting, printf single: string; interpolation, printf single: printf-style formatting single: sprintf-style formatting single: % (percent); printf-s...
python, official-docs, cpython, P0
Local_Trusted_Corpus
7d36a7a3-82db-4623-bedf-18f987bd9940
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,400
supabase-export-v2
17ee7e17b28d6ea0
objects don't accept strings as their arguments, just as the methods on strings don't accept bytes as their arguments. For example, you have to write:: a = "abc" b = a.replace("a", "f")
trusted_official_docs
CPython Docs
objects don't accept strings as their arguments, just as the methods on strings don't accept bytes as their arguments. For example, you have to write:: a = "abc" b = a.replace("a", "f")
objects don't accept strings as their arguments, just as the methods on strings don't accept bytes as their arguments. For example, you have to write:: a = "abc" b = a.replace("a", "f")
python, official-docs, cpython, P0
Local_Trusted_Corpus
7d7d1066-ab8b-4e2d-8b76-97a52d2293c2
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,713
supabase-export-v2
9f685adc5f3bb3ce
is represented using *length* bytes, and defaults to 1. An :exc:`OverflowError` is raised if the integer is not representable with the given number of bytes. The *byteorder* argument determines the byte order used to represent the integer, and defaults to ``"big"``. If *byteorder* is ``"big"``, the most significant b...
trusted_official_docs
CPython Docs
is represented using *length* bytes, and defaults to 1. An :exc:`OverflowError` is raised if the integer is not representable with the given number of bytes. The *byteorder* argument determines the byte order used to represent the integer, and defaults to ``"big"``. If *byteorder* is ``"big"``, the most significant b...
is represented using *length* bytes, and defaults to 1. An :exc:`OverflowError` is raised if the integer is not representable with the given number of bytes. The *byteorder* argument determines the byte order used to represent the integer, and defaults to ``"big"``. If *byteorder* is ``"big"``, the most significant b...
python, official-docs, cpython, P0
Local_Trusted_Corpus
7e61c8cd-88a5-4183-a36e-59214c19dfca
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,187
supabase-export-v2
ff14e1da5d6b2a8c
>>> 'ab c\n\nde fg\rkl\r\n'.splitlines() ['ab c', '', 'de fg', 'kl'] >>> 'ab c\n\nde fg\rkl\r\n'.splitlines(keepends=True) ['ab c\n', '\n', 'de fg\r', 'kl\r\n'] Unlike :meth:`~str.split` when a delimiter string *sep* is given, this method returns an empty list for the empty string, and a terminal line break does not ...
trusted_official_docs
CPython Docs
>>> 'ab c\n\nde fg\rkl\r\n'.splitlines() ['ab c', '', 'de fg', 'kl'] >>> 'ab c\n\nde fg\rkl\r\n'.splitlines(keepends=True) ['ab c\n', '\n', 'de fg\r', 'kl\r\n'] Unlike :meth:`~str.split` when a delimiter string *sep* is given, this method returns an empty list for the empty string, and a terminal line break does not ...
>>> 'ab c\n\nde fg\rkl\r\n'.splitlines() ['ab c', '', 'de fg', 'kl'] >>> 'ab c\n\nde fg\rkl\r\n'.splitlines(keepends=True) ['ab c\n', '\n', 'de fg\r', 'kl\r\n'] Unlike :meth:`~str.split` when a delimiter string *sep* is given, this method returns an empty list for the empty string, and a terminal line break does not ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
7e649e2d-ceaf-4b66-a7f3-a6bb055513cf
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,747
supabase-export-v2
8e2fa3fe246a61f8
.. method:: float.as_integer_ratio() Return a pair of integers whose ratio is exactly equal to the original float. The ratio is in lowest terms and has a positive denominator. Raises :exc:`OverflowError` on infinities and a :exc:`ValueError` on NaNs.
trusted_official_docs
CPython Docs
.. method:: float.as_integer_ratio() Return a pair of integers whose ratio is exactly equal to the original float. The ratio is in lowest terms and has a positive denominator. Raises :exc:`OverflowError` on infinities and a :exc:`ValueError` on NaNs.
.. method:: float.as_integer_ratio() Return a pair of integers whose ratio is exactly equal to the original float. The ratio is in lowest terms and has a positive denominator. Raises :exc:`OverflowError` on infinities and a :exc:`ValueError` on NaNs.
python, official-docs, cpython, P0
Local_Trusted_Corpus
80d151e7-16cc-43b3-9fbe-85f496882e81
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,523
supabase-export-v2
b89996a10d50d4f0
The bytearray version of this method does *not* operate in place - it always produces a new object, even if no changes were made. The following methods on bytes and bytearray objects assume the use of ASCII compatible binary formats and should not be applied to arbitrary binary data. Note that all of the bytearray meth...
trusted_official_docs
CPython Docs
The bytearray version of this method does *not* operate in place - it always produces a new object, even if no changes were made. The following methods on bytes and bytearray objects assume the use of ASCII compatible binary formats and should not be applied to arbitrary binary data. Note that all of the bytearray meth...
The bytearray version of this method does *not* operate in place - it always produces a new object, even if no changes were made. The following methods on bytes and bytearray objects assume the use of ASCII compatible binary formats and should not be applied to arbitrary binary data. Note that all of the bytearray meth...
python, official-docs, cpython, P0
Local_Trusted_Corpus
8149705c-b7f5-459c-b8d2-9f6694b1a03d
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,036
supabase-export-v2
2ce6e6d29ea34c0f
.. doctest:: >>> 'spam, spam, spam'.index('spam') 0 >>> 'spam, spam, spam'.index('eggs') Traceback (most recent call last): File "<python-input-0>", line 1, in <module> 'spam, spam, spam'.index('eggs') ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^ ValueError: substring not found
trusted_official_docs
CPython Docs
.. doctest:: >>> 'spam, spam, spam'.index('spam') 0 >>> 'spam, spam, spam'.index('eggs') Traceback (most recent call last): File "<python-input-0>", line 1, in <module> 'spam, spam, spam'.index('eggs') ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^ ValueError: substring not found
.. doctest:: >>> 'spam, spam, spam'.index('spam') 0 >>> 'spam, spam, spam'.index('eggs') Traceback (most recent call last): File "<python-input-0>", line 1, in <module> 'spam, spam, spam'.index('eggs') ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^ ValueError: substring not found
python, official-docs, cpython, P0
Local_Trusted_Corpus
817887e4-e8b8-4688-8691-3c4f45fe958d
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,670
supabase-export-v2
d8981c2cd87e2fec
recent call last): File "<stdin>", line 1, in <module> ValueError: memoryview assignment: lvalue and rvalue have different structures >>> v[2:6] = b'spam' >>> data bytearray(b'z1spam') One-dimensional memoryviews of :term:`hashable` (read-only) types with formats 'B', 'b' or 'c' are also hashable. The hash is defined ...
trusted_official_docs
CPython Docs
recent call last): File "<stdin>", line 1, in <module> ValueError: memoryview assignment: lvalue and rvalue have different structures >>> v[2:6] = b'spam' >>> data bytearray(b'z1spam') One-dimensional memoryviews of :term:`hashable` (read-only) types with formats 'B', 'b' or 'c' are also hashable. The hash is defined ...
recent call last): File "<stdin>", line 1, in <module> ValueError: memoryview assignment: lvalue and rvalue have different structures >>> v[2:6] = b'spam' >>> data bytearray(b'z1spam') One-dimensional memoryviews of :term:`hashable` (read-only) types with formats 'B', 'b' or 'c' are also hashable. The hash is defined ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
81dfa938-7387-44d3-a423-ab38b657da6c
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,982
supabase-export-v2
27e54b42b32309a9
that handles a narrower range of types and is slightly harder to use correctly, but is often faster for the cases it can handle (:ref:`old-string-formatting`). The :ref:`textservices` section of the standard library covers a number of other modules that provide various text related utilities (including regular expressi...
trusted_official_docs
CPython Docs
that handles a narrower range of types and is slightly harder to use correctly, but is often faster for the cases it can handle (:ref:`old-string-formatting`). The :ref:`textservices` section of the standard library covers a number of other modules that provide various text related utilities (including regular expressi...
that handles a narrower range of types and is slightly harder to use correctly, but is often faster for the cases it can handle (:ref:`old-string-formatting`). The :ref:`textservices` section of the standard library covers a number of other modules that provide various text related utilities (including regular expressi...
python, official-docs, cpython, P0
Local_Trusted_Corpus
82606cab-06d3-4e9d-a32a-e6271566d31a
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,391
supabase-export-v2
b6b4229b0a0aaafe
will be a bytearray object of length 1. (This contrasts with text strings, where both indexing and slicing will produce a string of length 1) The representation of bytearray objects uses the bytes literal format (``bytearray(b'...')``) since it is often more useful than e.g. ``bytearray([46, 46, 46])``. You can always ...
trusted_official_docs
CPython Docs
will be a bytearray object of length 1. (This contrasts with text strings, where both indexing and slicing will produce a string of length 1) The representation of bytearray objects uses the bytes literal format (``bytearray(b'...')``) since it is often more useful than e.g. ``bytearray([46, 46, 46])``. You can always ...
will be a bytearray object of length 1. (This contrasts with text strings, where both indexing and slicing will produce a string of length 1) The representation of bytearray objects uses the bytes literal format (``bytearray(b'...')``) since it is often more useful than e.g. ``bytearray([46, 46, 46])``. You can always ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
82a0601f-235a-4a1f-8565-56581e1d1a27
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,628
supabase-export-v2
22f0c8fb6758a679
mapping key into that dictionary inserted immediately after the ``'%'`` character. The mapping key selects the value to be formatted from the mapping. For example: >>> print(b'%(language)s has %(number)03d quote types.' % ... {b'language': b"Python", b"number": 2}) b'Python has 002 quote types.'
trusted_official_docs
CPython Docs
mapping key into that dictionary inserted immediately after the ``'%'`` character. The mapping key selects the value to be formatted from the mapping. For example: >>> print(b'%(language)s has %(number)03d quote types.' % ... {b'language': b"Python", b"number": 2}) b'Python has 002 quote types.'
mapping key into that dictionary inserted immediately after the ``'%'`` character. The mapping key selects the value to be formatted from the mapping. For example: >>> print(b'%(language)s has %(number)03d quote types.' % ... {b'language': b"Python", b"number": 2}) b'Python has 002 quote types.'
python, official-docs, cpython, P0
Local_Trusted_Corpus
832f5d10-621f-4abb-90d3-8f43fe348177
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,511
supabase-export-v2
9624ff064326b43c
``maxsplit+1`` elements). If *maxsplit* is not specified or is ``-1``, then there is no limit on the number of splits (all possible splits are made). If *sep* is given, consecutive delimiters are not grouped together and are deemed to delimit empty subsequences (for example, ``b'1,,2'.split(b',')`` returns ``[b'1', b...
trusted_official_docs
CPython Docs
``maxsplit+1`` elements). If *maxsplit* is not specified or is ``-1``, then there is no limit on the number of splits (all possible splits are made). If *sep* is given, consecutive delimiters are not grouped together and are deemed to delimit empty subsequences (for example, ``b'1,,2'.split(b',')`` returns ``[b'1', b...
``maxsplit+1`` elements). If *maxsplit* is not specified or is ``-1``, then there is no limit on the number of splits (all possible splits are made). If *sep* is given, consecutive delimiters are not grouped together and are deemed to delimit empty subsequences (for example, ``b'1,,2'.split(b',')`` returns ``[b'1', b...
python, official-docs, cpython, P0
Local_Trusted_Corpus
8368e4df-5978-4465-b610-f262266b2791
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,687
supabase-export-v2
6d9e99fa28fef5ae
make sense for integers. The result of bitwise operations is calculated as though carried out in two's complement with an infinite number of sign bits. The priorities of the binary bitwise operations are all lower than the numeric operations and higher than the comparisons; the unary operation ``~`` has the same priori...
trusted_official_docs
CPython Docs
make sense for integers. The result of bitwise operations is calculated as though carried out in two's complement with an infinite number of sign bits. The priorities of the binary bitwise operations are all lower than the numeric operations and higher than the comparisons; the unary operation ``~`` has the same priori...
make sense for integers. The result of bitwise operations is calculated as though carried out in two's complement with an infinite number of sign bits. The priorities of the binary bitwise operations are all lower than the numeric operations and higher than the comparisons; the unary operation ``~`` has the same priori...
python, official-docs, cpython, P0
Local_Trusted_Corpus
836db55c-9ee2-4d35-a13b-7c481c1beb3b
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,470
supabase-export-v2
d6f0f938cf111ae9
separator. If the separator is not found, return a 3-tuple containing two empty bytes or bytearray objects, followed by a copy of the original sequence. The separator to search for may be any :term:`bytes-like object`.
trusted_official_docs
CPython Docs
separator. If the separator is not found, return a 3-tuple containing two empty bytes or bytearray objects, followed by a copy of the original sequence. The separator to search for may be any :term:`bytes-like object`.
separator. If the separator is not found, return a 3-tuple containing two empty bytes or bytearray objects, followed by a copy of the original sequence. The separator to search for may be any :term:`bytes-like object`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
8389fdad-b3cd-43ba-91ea-127196d18e97
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,240
supabase-export-v2
387682c23026d6aa
Formatted String Literals (f-strings) ------------------------------------- .. versionadded:: 3.6 .. versionchanged:: 3.7 The :keyword:`await` and :keyword:`async for` can be used in expressions within f-strings. .. versionchanged:: 3.8 Added the debug specifier (``=``) .. versionchanged:: 3.12 Many restrictions on...
trusted_official_docs
CPython Docs
Formatted String Literals (f-strings) ------------------------------------- .. versionadded:: 3.6 .. versionchanged:: 3.7 The :keyword:`await` and :keyword:`async for` can be used in expressions within f-strings. .. versionchanged:: 3.8 Added the debug specifier (``=``) .. versionchanged:: 3.12 Many restrictions on...
Formatted String Literals (f-strings) ------------------------------------- .. versionadded:: 3.6 .. versionchanged:: 3.7 The :keyword:`await` and :keyword:`async for` can be used in expressions within f-strings. .. versionchanged:: 3.8 Added the debug specifier (``=``) .. versionchanged:: 3.12 Many restrictions on...
python, official-docs, cpython, P0
Local_Trusted_Corpus
83ee41e5-1513-4293-80f4-e97573153be8
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,704
supabase-export-v2
370146316c0bc32e
example, a :class:`bytearray` would temporarily forbid resizing); therefore, calling release() is handy to remove these restrictions (and free any dangling resources) as soon as possible. After this method has been called, any further operation on the view raises a :class:`ValueError` (except :meth:`release` itself wh...
trusted_official_docs
CPython Docs
example, a :class:`bytearray` would temporarily forbid resizing); therefore, calling release() is handy to remove these restrictions (and free any dangling resources) as soon as possible. After this method has been called, any further operation on the view raises a :class:`ValueError` (except :meth:`release` itself wh...
example, a :class:`bytearray` would temporarily forbid resizing); therefore, calling release() is handy to remove these restrictions (and free any dangling resources) as soon as possible. After this method has been called, any further operation on the view raises a :class:`ValueError` (except :meth:`release` itself wh...
python, official-docs, cpython, P0
Local_Trusted_Corpus
843a05df-bb2a-4dc7-8a82-0f87196064b6
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,910
supabase-export-v2
7e4d34a703f09e2c
*reverse* is a boolean value. If set to ``True``, then the list elements are sorted as if each comparison were reversed. This method modifies the sequence in place for economy of space when sorting a large sequence. To remind users that it operates by side effect, it does not return the sorted sequence (use :func:`so...
trusted_official_docs
CPython Docs
*reverse* is a boolean value. If set to ``True``, then the list elements are sorted as if each comparison were reversed. This method modifies the sequence in place for economy of space when sorting a large sequence. To remind users that it operates by side effect, it does not return the sorted sequence (use :func:`so...
*reverse* is a boolean value. If set to ``True``, then the list elements are sorted as if each comparison were reversed. This method modifies the sequence in place for economy of space when sorting a large sequence. To remind users that it operates by side effect, it does not return the sorted sequence (use :func:`so...
python, official-docs, cpython, P0
Local_Trusted_Corpus
84ca4deb-55c7-4691-9f9e-753d17757ec4
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,241
supabase-export-v2
4872b63d73de0076
the debug specifier (``=``) .. versionchanged:: 3.12 Many restrictions on expressions within f-strings have been removed. Notably, nested strings, comments, and backslashes are now permitted. An :dfn:`f-string` (formally a :dfn:`formatted string literal`) is a string literal that is prefixed with ``f`` or ``F``. This t...
trusted_official_docs
CPython Docs
the debug specifier (``=``) .. versionchanged:: 3.12 Many restrictions on expressions within f-strings have been removed. Notably, nested strings, comments, and backslashes are now permitted. An :dfn:`f-string` (formally a :dfn:`formatted string literal`) is a string literal that is prefixed with ``f`` or ``F``. This t...
the debug specifier (``=``) .. versionchanged:: 3.12 Many restrictions on expressions within f-strings have been removed. Notably, nested strings, comments, and backslashes are now permitted. An :dfn:`f-string` (formally a :dfn:`formatted string literal`) is a string literal that is prefixed with ``f`` or ``F``. This t...
python, official-docs, cpython, P0
Local_Trusted_Corpus
85507838-4190-4f5b-8569-16a920824c76
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,486
supabase-export-v2
dd57d6dee08c7da4
.. method:: bytes.ljust(width, fillbyte=b' ', /) bytearray.ljust(width, fillbyte=b' ', /) Return a copy of the object left justified in a sequence of length *width*. Padding is done using the specified *fillbyte* (default is an ASCII space). For :class:`bytes` objects, the original sequence is returned if *width* is ...
trusted_official_docs
CPython Docs
.. method:: bytes.ljust(width, fillbyte=b' ', /) bytearray.ljust(width, fillbyte=b' ', /) Return a copy of the object left justified in a sequence of length *width*. Padding is done using the specified *fillbyte* (default is an ASCII space). For :class:`bytes` objects, the original sequence is returned if *width* is ...
.. method:: bytes.ljust(width, fillbyte=b' ', /) bytearray.ljust(width, fillbyte=b' ', /) Return a copy of the object left justified in a sequence of length *width*. Padding is done using the specified *fillbyte* (default is an ASCII space). For :class:`bytes` objects, the original sequence is returned if *width* is ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
85fb4a31-70b0-4174-a9a1-c81ec7a94218
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,679
supabase-export-v2
314b68cd3977c8bd
All :class:`numbers.Real` types (:class:`int` and :class:`float`) also include the following operations: +--------------------+---------------------------------------------+ | Operation | Result | +====================+=============================================+ | :func:`math.trunc(\| *x* truncated to :class:`~numbe...
trusted_official_docs
CPython Docs
All :class:`numbers.Real` types (:class:`int` and :class:`float`) also include the following operations: +--------------------+---------------------------------------------+ | Operation | Result | +====================+=============================================+ | :func:`math.trunc(\| *x* truncated to :class:`~numbe...
All :class:`numbers.Real` types (:class:`int` and :class:`float`) also include the following operations: +--------------------+---------------------------------------------+ | Operation | Result | +====================+=============================================+ | :func:`math.trunc(\| *x* truncated to :class:`~numbe...
python, official-docs, cpython, P0
Local_Trusted_Corpus
8603df41-4ea8-4e54-bbba-11502e05b8c9
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,647
supabase-export-v2
99b3740e8bd5137d
of the methods :meth:`~object.__lt__`, :meth:`~object.__le__`, :meth:`~object.__gt__`, and :meth:`~object.__ge__` (in general, :meth:`~object.__lt__` and :meth:`~object.__eq__` are sufficient, if you want the conventional meanings of the comparison operators). The behavior of the :keyword:`is` and :keyword:`is not` ope...
trusted_official_docs
CPython Docs
of the methods :meth:`~object.__lt__`, :meth:`~object.__le__`, :meth:`~object.__gt__`, and :meth:`~object.__ge__` (in general, :meth:`~object.__lt__` and :meth:`~object.__eq__` are sufficient, if you want the conventional meanings of the comparison operators). The behavior of the :keyword:`is` and :keyword:`is not` ope...
of the methods :meth:`~object.__lt__`, :meth:`~object.__le__`, :meth:`~object.__gt__`, and :meth:`~object.__ge__` (in general, :meth:`~object.__lt__` and :meth:`~object.__eq__` are sufficient, if you want the conventional meanings of the comparison operators). The behavior of the :keyword:`is` and :keyword:`is not` ope...
python, official-docs, cpython, P0
Local_Trusted_Corpus
876f4994-e23e-415e-b92c-6e1fd24347bd
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,659
supabase-export-v2
ddef7165c24982d9
Create a :class:`memoryview` that references *object*. *object* must support the buffer protocol. Built-in objects that support the buffer protocol include :class:`bytes` and :class:`bytearray`. A :class:`memoryview` has the notion of an *element*, which is the atomic memory unit handled by the originating *object*. F...
trusted_official_docs
CPython Docs
Create a :class:`memoryview` that references *object*. *object* must support the buffer protocol. Built-in objects that support the buffer protocol include :class:`bytes` and :class:`bytearray`. A :class:`memoryview` has the notion of an *element*, which is the atomic memory unit handled by the originating *object*. F...
Create a :class:`memoryview` that references *object*. *object* must support the buffer protocol. Built-in objects that support the buffer protocol include :class:`bytes` and :class:`bytearray`. A :class:`memoryview` has the notion of an *element*, which is the atomic memory unit handled by the originating *object*. F...
python, official-docs, cpython, P0
Local_Trusted_Corpus
87fac2af-8150-45fc-bed1-944085e837a5
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,905
supabase-export-v2
3b6943bc416b6dfe
.. method:: list.sort(*, key=None, reverse=False) This method sorts the list in place, using only ``<`` comparisons between items. Exceptions are not suppressed - if any comparison operations fail, the entire sort operation will fail (and the list will likely be left in a partially modified state).
trusted_official_docs
CPython Docs
.. method:: list.sort(*, key=None, reverse=False) This method sorts the list in place, using only ``<`` comparisons between items. Exceptions are not suppressed - if any comparison operations fail, the entire sort operation will fail (and the list will likely be left in a partially modified state).
.. method:: list.sort(*, key=None, reverse=False) This method sorts the list in place, using only ``<`` comparisons between items. Exceptions are not suppressed - if any comparison operations fail, the entire sort operation will fail (and the list will likely be left in a partially modified state).
python, official-docs, cpython, P0
Local_Trusted_Corpus
8916109f-57ca-43f0-a10a-be7ee7d04ce1
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,972
supabase-export-v2
7e8ad59381d86c5f
*object*. For string objects, this is the string itself. If *object* does not have a :meth:`~object.__str__` method, then :func:`str` falls back to returning :func:`repr(object) <repr>`. .. index:: single: buffer protocol; str (built-in class) single: bytes; str (built-in class)
trusted_official_docs
CPython Docs
*object*. For string objects, this is the string itself. If *object* does not have a :meth:`~object.__str__` method, then :func:`str` falls back to returning :func:`repr(object) <repr>`. .. index:: single: buffer protocol; str (built-in class) single: bytes; str (built-in class)
*object*. For string objects, this is the string itself. If *object* does not have a :meth:`~object.__str__` method, then :func:`str` falls back to returning :func:`repr(object) <repr>`. .. index:: single: buffer protocol; str (built-in class) single: bytes; str (built-in class)
python, official-docs, cpython, P0
Local_Trusted_Corpus
89613ac2-4367-4e06-8b1f-f35ff4690731
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,771
supabase-export-v2
0507de9663861974
Hashing of numeric types ------------------------ For numbers ``x`` and ``y``, possibly of different types, it's a requirement that ``hash(x) == hash(y)`` whenever ``x == y`` (see the :meth:`~object.__hash__` method documentation for more details). For ease of implementation and efficiency across a variety of numeric t...
trusted_official_docs
CPython Docs
Hashing of numeric types ------------------------ For numbers ``x`` and ``y``, possibly of different types, it's a requirement that ``hash(x) == hash(y)`` whenever ``x == y`` (see the :meth:`~object.__hash__` method documentation for more details). For ease of implementation and efficiency across a variety of numeric t...
Hashing of numeric types ------------------------ For numbers ``x`` and ``y``, possibly of different types, it's a requirement that ``hash(x) == hash(y)`` whenever ``x == y`` (see the :meth:`~object.__hash__` method documentation for more details). For ease of implementation and efficiency across a variety of numeric t...
python, official-docs, cpython, P0
Local_Trusted_Corpus
89766185-2890-4e81-92c6-ad4e533e6458
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,952
supabase-export-v2
14ff8cb41169a6bb
* The `linspace recipe <https://code.activestate.com/recipes/579000-equally-spaced-numbers-linspace/>`_ shows how to implement a lazy version of range suitable for floating-point applications. .. index:: single: string; text sequence type single: str (built-in class); (see also string) pair: object; string
trusted_official_docs
CPython Docs
* The `linspace recipe <https://code.activestate.com/recipes/579000-equally-spaced-numbers-linspace/>`_ shows how to implement a lazy version of range suitable for floating-point applications. .. index:: single: string; text sequence type single: str (built-in class); (see also string) pair: object; string
* The `linspace recipe <https://code.activestate.com/recipes/579000-equally-spaced-numbers-linspace/>`_ shows how to implement a lazy version of range suitable for floating-point applications. .. index:: single: string; text sequence type single: str (built-in class); (see also string) pair: object; string
python, official-docs, cpython, P0
Local_Trusted_Corpus
897dbe99-a30e-4db7-ad94-83bce18d2620
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,973
supabase-export-v2
90e59f775add2f17
.. index:: single: buffer protocol; str (built-in class) single: bytes; str (built-in class) If at least one of *encoding* or *errors* is given, *object* should be a :term:`bytes-like object` (e.g. :class:`bytes` or :class:`bytearray`). In this case, if *object* is a :class:`bytes` (or :class:`bytearray`) object, th...
trusted_official_docs
CPython Docs
.. index:: single: buffer protocol; str (built-in class) single: bytes; str (built-in class) If at least one of *encoding* or *errors* is given, *object* should be a :term:`bytes-like object` (e.g. :class:`bytes` or :class:`bytearray`). In this case, if *object* is a :class:`bytes` (or :class:`bytearray`) object, th...
.. index:: single: buffer protocol; str (built-in class) single: bytes; str (built-in class) If at least one of *encoding* or *errors* is given, *object* should be a :term:`bytes-like object` (e.g. :class:`bytes` or :class:`bytearray`). In this case, if *object* is a :class:`bytes` (or :class:`bytearray`) object, th...
python, official-docs, cpython, P0
Local_Trusted_Corpus
8a02166b-a6b4-4d37-a118-c5bee824abd6
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,366
supabase-export-v2
c408b24101d95f1a
.. versionchanged:: 3.7 :meth:`bytearray.fromhex` now skips all ASCII whitespace in the string, not just spaces. .. versionchanged:: 3.14 :meth:`bytearray.fromhex` now accepts ASCII :class:`bytes` and :term:`bytes-like objects <bytes-like object>` as input.
trusted_official_docs
CPython Docs
.. versionchanged:: 3.7 :meth:`bytearray.fromhex` now skips all ASCII whitespace in the string, not just spaces. .. versionchanged:: 3.14 :meth:`bytearray.fromhex` now accepts ASCII :class:`bytes` and :term:`bytes-like objects <bytes-like object>` as input.
.. versionchanged:: 3.7 :meth:`bytearray.fromhex` now skips all ASCII whitespace in the string, not just spaces. .. versionchanged:: 3.14 :meth:`bytearray.fromhex` now accepts ASCII :class:`bytes` and :term:`bytes-like objects <bytes-like object>` as input.
python, official-docs, cpython, P0
Local_Trusted_Corpus
8a5101fa-2be1-41b7-bb0d-f252e3d40818
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,829
supabase-export-v2
269559763ea3790e
.. index:: single: loop; over mutable sequence single: mutable sequence; loop over Forward and reversed iterators over mutable sequences access values using an index. That index will continue to march forward (or backward) even if the underlying sequence is mutated. The iterator terminates only when an :exc:`IndexError...
trusted_official_docs
CPython Docs
.. index:: single: loop; over mutable sequence single: mutable sequence; loop over Forward and reversed iterators over mutable sequences access values using an index. That index will continue to march forward (or backward) even if the underlying sequence is mutated. The iterator terminates only when an :exc:`IndexError...
.. index:: single: loop; over mutable sequence single: mutable sequence; loop over Forward and reversed iterators over mutable sequences access values using an index. That index will continue to march forward (or backward) even if the underlying sequence is mutated. The iterator terminates only when an :exc:`IndexError...
python, official-docs, cpython, P0
Local_Trusted_Corpus
8ac514af-c518-412e-adc3-f8470d4e333b
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,774
supabase-export-v2
cef9e6e9c99987d4
used is ``P = 2**31 - 1`` on machines with 32-bit C longs and ``P = 2**61 - 1`` on machines with 64-bit C longs. Here are the rules in detail:
trusted_official_docs
CPython Docs
used is ``P = 2**31 - 1`` on machines with 32-bit C longs and ``P = 2**61 - 1`` on machines with 64-bit C longs. Here are the rules in detail:
used is ``P = 2**31 - 1`` on machines with 32-bit C longs and ``P = 2**61 - 1`` on machines with 64-bit C longs. Here are the rules in detail:
python, official-docs, cpython, P0
Local_Trusted_Corpus
8b17b43a-c3db-474b-ad6a-62dd92f152be
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,960
supabase-export-v2
30563f91401306eb
* Single quotes: ``'allows embedded "double" quotes'`` * Double quotes: ``"allows embedded 'single' quotes"`` * Triple quoted: ``'''Three single quotes'''``, ``"""Three double quotes"""`` Triple quoted strings may span multiple lines - all associated whitespace will be included in the string literal.
trusted_official_docs
CPython Docs
* Single quotes: ``'allows embedded "double" quotes'`` * Double quotes: ``"allows embedded 'single' quotes"`` * Triple quoted: ``'''Three single quotes'''``, ``"""Three double quotes"""`` Triple quoted strings may span multiple lines - all associated whitespace will be included in the string literal.
* Single quotes: ``'allows embedded "double" quotes'`` * Double quotes: ``"allows embedded 'single' quotes"`` * Triple quoted: ``'''Three single quotes'''``, ``"""Three double quotes"""`` Triple quoted strings may span multiple lines - all associated whitespace will be included in the string literal.
python, official-docs, cpython, P0
Local_Trusted_Corpus
8b6c57b4-5d8f-4ec3-8f43-5ceddf3e4c76
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,249
supabase-export-v2
7c437ff9bea0b215
Whitespace before, inside and after the expression, as well as whitespace after the equal sign, is significant --- it is retained in the result:: >>> f'{ number - 4 = }' ' number - 4 = 10.3'
trusted_official_docs
CPython Docs
Whitespace before, inside and after the expression, as well as whitespace after the equal sign, is significant --- it is retained in the result:: >>> f'{ number - 4 = }' ' number - 4 = 10.3'
Whitespace before, inside and after the expression, as well as whitespace after the equal sign, is significant --- it is retained in the result:: >>> f'{ number - 4 = }' ' number - 4 = 10.3'
python, official-docs, cpython, P0
Local_Trusted_Corpus
8bd806f4-5168-4de1-afd8-200491fbe25d
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,028
supabase-export-v2
7b872488bf400532
if they are non-ASCII or longer than 1 byte, and the ``LC_NUMERIC`` locale is different than the ``LC_CTYPE`` locale. This temporary change affects other threads. .. versionchanged:: 3.7 When formatting a number with the ``n`` type, the function sets temporarily the ``LC_CTYPE`` locale to the ``LC_NUMERIC`` locale in...
trusted_official_docs
CPython Docs
if they are non-ASCII or longer than 1 byte, and the ``LC_NUMERIC`` locale is different than the ``LC_CTYPE`` locale. This temporary change affects other threads. .. versionchanged:: 3.7 When formatting a number with the ``n`` type, the function sets temporarily the ``LC_CTYPE`` locale to the ``LC_NUMERIC`` locale in...
if they are non-ASCII or longer than 1 byte, and the ``LC_NUMERIC`` locale is different than the ``LC_CTYPE`` locale. This temporary change affects other threads. .. versionchanged:: 3.7 When formatting a number with the ``n`` type, the function sets temporarily the ``LC_CTYPE`` locale to the ``LC_NUMERIC`` locale in...
python, official-docs, cpython, P0
Local_Trusted_Corpus
8bd9bebe-fe40-4d35-ad73-b3992d392c45
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,584
supabase-export-v2
b62ce28234aa0ce2
Lowercase ASCII characters are those byte values in the sequence ``b'abcdefghijklmnopqrstuvwxyz'``. Uppercase ASCII characters are those byte values in the sequence ``b'ABCDEFGHIJKLMNOPQRSTUVWXYZ'``. Unlike :func:`str.swapcase`, it is always the case that ``bin.swapcase().swapcase() == bin`` for the binary versions. C...
trusted_official_docs
CPython Docs
Lowercase ASCII characters are those byte values in the sequence ``b'abcdefghijklmnopqrstuvwxyz'``. Uppercase ASCII characters are those byte values in the sequence ``b'ABCDEFGHIJKLMNOPQRSTUVWXYZ'``. Unlike :func:`str.swapcase`, it is always the case that ``bin.swapcase().swapcase() == bin`` for the binary versions. C...
Lowercase ASCII characters are those byte values in the sequence ``b'abcdefghijklmnopqrstuvwxyz'``. Uppercase ASCII characters are those byte values in the sequence ``b'ABCDEFGHIJKLMNOPQRSTUVWXYZ'``. Unlike :func:`str.swapcase`, it is always the case that ``bin.swapcase().swapcase() == bin`` for the binary versions. C...
python, official-docs, cpython, P0
Local_Trusted_Corpus
8c1166d2-4250-437f-8ba2-e972b4c32c8d
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,789
supabase-export-v2
803a4ce6ed09018f
def hash_complex(z): """Compute the hash of a complex number z.""" hash_value = hash_float(z.real) + sys.hash_info.imag * hash_float(z.imag) # do a signed reduction modulo 2**sys.hash_info.width M = 2**(sys.hash_info.width - 1) hash_value = (hash_value & (M - 1)) - (hash_value & M) if hash_value == -1: hash_value ...
trusted_official_docs
CPython Docs
def hash_complex(z): """Compute the hash of a complex number z.""" hash_value = hash_float(z.real) + sys.hash_info.imag * hash_float(z.imag) # do a signed reduction modulo 2**sys.hash_info.width M = 2**(sys.hash_info.width - 1) hash_value = (hash_value & (M - 1)) - (hash_value & M) if hash_value == -1: hash_value ...
def hash_complex(z): """Compute the hash of a complex number z.""" hash_value = hash_float(z.real) + sys.hash_info.imag * hash_float(z.imag) # do a signed reduction modulo 2**sys.hash_info.width M = 2**(sys.hash_info.width - 1) hash_value = (hash_value & (M - 1)) - (hash_value & M) if hash_value == -1: hash_value ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
8d64b615-cef8-4349-b99d-38738eab3bfe
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,592
supabase-export-v2
24e1afd0159ac9af
are those byte values in the sequence ``b'abcdefghijklmnopqrstuvwxyz'``. Uppercase ASCII characters are those byte values in the sequence ``b'ABCDEFGHIJKLMNOPQRSTUVWXYZ'``. All other byte values are uncased. The algorithm uses a simple language-independent definition of a word as groups of consecutive letters. The def...
trusted_official_docs
CPython Docs
are those byte values in the sequence ``b'abcdefghijklmnopqrstuvwxyz'``. Uppercase ASCII characters are those byte values in the sequence ``b'ABCDEFGHIJKLMNOPQRSTUVWXYZ'``. All other byte values are uncased. The algorithm uses a simple language-independent definition of a word as groups of consecutive letters. The def...
are those byte values in the sequence ``b'abcdefghijklmnopqrstuvwxyz'``. Uppercase ASCII characters are those byte values in the sequence ``b'ABCDEFGHIJKLMNOPQRSTUVWXYZ'``. All other byte values are uncased. The algorithm uses a simple language-independent definition of a word as groups of consecutive letters. The def...
python, official-docs, cpython, P0
Local_Trusted_Corpus
8d6c158c-d28f-4e26-a4b7-1e282906331d
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,327
supabase-export-v2
ae85f5fc766a5172
several methods that are only valid when working with ASCII compatible data and are closely related to string objects in a variety of other ways. .. class:: bytes(source=b'') bytes(source, encoding, errors='strict')
trusted_official_docs
CPython Docs
several methods that are only valid when working with ASCII compatible data and are closely related to string objects in a variety of other ways. .. class:: bytes(source=b'') bytes(source, encoding, errors='strict')
several methods that are only valid when working with ASCII compatible data and are closely related to string objects in a variety of other ways. .. class:: bytes(source=b'') bytes(source, encoding, errors='strict')
python, official-docs, cpython, P0
Local_Trusted_Corpus
8d8600a3-45e4-491b-b39e-bdb82ee9e6a7
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,264
supabase-export-v2
f79e7cd8ebe6f9eb
is passed to :func:`!format` as the second argument. The result of :func:`!format` is then used as the final value for the replacement field. For example:: >>> from fractions import Fraction >>> one_third = Fraction(1, 3) >>> f'{one_third:.6f}' '0.333333' >>> f'{one_third:_^+10}' '___+1/3___' >>> >>> f'{one_third...
trusted_official_docs
CPython Docs
is passed to :func:`!format` as the second argument. The result of :func:`!format` is then used as the final value for the replacement field. For example:: >>> from fractions import Fraction >>> one_third = Fraction(1, 3) >>> f'{one_third:.6f}' '0.333333' >>> f'{one_third:_^+10}' '___+1/3___' >>> >>> f'{one_third...
is passed to :func:`!format` as the second argument. The result of :func:`!format` is then used as the final value for the replacement field. For example:: >>> from fractions import Fraction >>> one_third = Fraction(1, 3) >>> f'{one_third:.6f}' '0.333333' >>> f'{one_third:_^+10}' '___+1/3___' >>> >>> f'{one_third...
python, official-docs, cpython, P0
Local_Trusted_Corpus
8efa84de-d08a-41d1-b29c-195554a8f21c
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,292
supabase-export-v2
058a506372d49169
#. Conversion type. When the right argument is a dictionary (or other mapping type), then the formats in the string *must* include a parenthesised mapping key into that dictionary inserted immediately after the ``'%'`` character. The mapping key selects the value to be formatted from the mapping. For example:
trusted_official_docs
CPython Docs
#. Conversion type. When the right argument is a dictionary (or other mapping type), then the formats in the string *must* include a parenthesised mapping key into that dictionary inserted immediately after the ``'%'`` character. The mapping key selects the value to be formatted from the mapping. For example:
#. Conversion type. When the right argument is a dictionary (or other mapping type), then the formats in the string *must* include a parenthesised mapping key into that dictionary inserted immediately after the ``'%'`` character. The mapping key selects the value to be formatted from the mapping. For example:
python, official-docs, cpython, P0
Local_Trusted_Corpus
8f2b4ec9-10d8-42d8-88c2-3abbe690a6ee
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,408
supabase-export-v2
0abda1d85009606c
If *sub* is empty, returns the number of empty slices between characters which is the length of the bytes object plus one. .. versionchanged:: 3.3 Also accept an integer in the range 0 to 255 as the subsequence.
trusted_official_docs
CPython Docs
If *sub* is empty, returns the number of empty slices between characters which is the length of the bytes object plus one. .. versionchanged:: 3.3 Also accept an integer in the range 0 to 255 as the subsequence.
If *sub* is empty, returns the number of empty slices between characters which is the length of the bytes object plus one. .. versionchanged:: 3.3 Also accept an integer in the range 0 to 255 as the subsequence.
python, official-docs, cpython, P0
Local_Trusted_Corpus
8f674b08-0f81-4517-a0a0-0cf20673a6df
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,955
supabase-export-v2
5403c7c4a529c5eb
Text and Binary Sequence Type Methods Summary ============================================= The following table summarizes the text and binary sequence types methods by category. +--------------------------+-------------------------------------------+---------------------------------------------------+ | Category | :cl...
trusted_official_docs
CPython Docs
Text and Binary Sequence Type Methods Summary ============================================= The following table summarizes the text and binary sequence types methods by category. +--------------------------+-------------------------------------------+---------------------------------------------------+ | Category | :cl...
Text and Binary Sequence Type Methods Summary ============================================= The following table summarizes the text and binary sequence types methods by category. +--------------------------+-------------------------------------------+---------------------------------------------------+ | Category | :cl...
python, official-docs, cpython, P0
Local_Trusted_Corpus
8fc2dee7-9f75-4dc6-ad2f-65aa25bcb48d
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,620
supabase-export-v2
e4f3fbaa2e703c41
.. index:: single: true By default, an object is considered true unless its class defines either a :meth:`~object.__bool__` method that returns ``False`` or a :meth:`~object.__len__` method that returns zero, when called with the object. [1]_ If one of the methods raises an exception when called, the exception is propa...
trusted_official_docs
CPython Docs
.. index:: single: true By default, an object is considered true unless its class defines either a :meth:`~object.__bool__` method that returns ``False`` or a :meth:`~object.__len__` method that returns zero, when called with the object. [1]_ If one of the methods raises an exception when called, the exception is propa...
.. index:: single: true By default, an object is considered true unless its class defines either a :meth:`~object.__bool__` method that returns ``False`` or a :meth:`~object.__len__` method that returns zero, when called with the object. [1]_ If one of the methods raises an exception when called, the exception is propa...
python, official-docs, cpython, P0
Local_Trusted_Corpus
9054b120-c0a5-4494-8036-a1706958f106
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,657
supabase-export-v2
cbb56d73e745e381
The constructors :func:`int`, :func:`float`, and :func:`complex` can be used to produce numbers of a specific type. .. index:: single: arithmetic pair: built-in function; int pair: built-in function; float pair: built-in function; complex single: operator; + (plus) single: + (plus); unary operator single: + (plu...
trusted_official_docs
CPython Docs
The constructors :func:`int`, :func:`float`, and :func:`complex` can be used to produce numbers of a specific type. .. index:: single: arithmetic pair: built-in function; int pair: built-in function; float pair: built-in function; complex single: operator; + (plus) single: + (plus); unary operator single: + (plu...
The constructors :func:`int`, :func:`float`, and :func:`complex` can be used to produce numbers of a specific type. .. index:: single: arithmetic pair: built-in function; int pair: built-in function; float pair: built-in function; complex single: operator; + (plus) single: + (plus); unary operator single: + (plu...
python, official-docs, cpython, P0
Local_Trusted_Corpus
9125f69f-2ba6-4667-9443-bcdb15ad2dd3
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,225
supabase-export-v2
5673062a46f5998b
You can use :meth:`str.maketrans` to create a translation map from character-to-character mappings in different formats. The following example uses a mapping to replace ``'a'`` with ``'X'``, ``'b'`` with ``'Y'``, and delete ``'c'``:
trusted_official_docs
CPython Docs
You can use :meth:`str.maketrans` to create a translation map from character-to-character mappings in different formats. The following example uses a mapping to replace ``'a'`` with ``'X'``, ``'b'`` with ``'Y'``, and delete ``'c'``:
You can use :meth:`str.maketrans` to create a translation map from character-to-character mappings in different formats. The following example uses a mapping to replace ``'a'`` with ``'X'``, ``'b'`` with ``'Y'``, and delete ``'c'``:
python, official-docs, cpython, P0
Local_Trusted_Corpus
914e398f-5cd8-47df-b380-8accfc80c8d3
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,676
supabase-export-v2
d0cc5a3a0cb82d0b
(5) Python defines ``pow(0, 0)`` and ``0 ** 0`` to be ``1``, as is common for programming languages. (6) The numeric literals accepted include the digits ``0`` to ``9`` or any Unicode equivalent (code points with the ``Nd`` property).
trusted_official_docs
CPython Docs
(5) Python defines ``pow(0, 0)`` and ``0 ** 0`` to be ``1``, as is common for programming languages. (6) The numeric literals accepted include the digits ``0`` to ``9`` or any Unicode equivalent (code points with the ``Nd`` property).
(5) Python defines ``pow(0, 0)`` and ``0 ** 0`` to be ``1``, as is common for programming languages. (6) The numeric literals accepted include the digits ``0`` to ``9`` or any Unicode equivalent (code points with the ``Nd`` property).
python, official-docs, cpython, P0
Local_Trusted_Corpus
925fa2ab-82c6-48ef-91c5-36d2aff006b4
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,564
supabase-export-v2
81ee0d81e0f9765e
>>> b'HELLO WORLD'.isupper() True >>> b'Hello world'.isupper() False Lowercase ASCII characters are those byte values in the sequence ``b'abcdefghijklmnopqrstuvwxyz'``. Uppercase ASCII characters are those byte values in the sequence ``b'ABCDEFGHIJKLMNOPQRSTUVWXYZ'``.
trusted_official_docs
CPython Docs
>>> b'HELLO WORLD'.isupper() True >>> b'Hello world'.isupper() False Lowercase ASCII characters are those byte values in the sequence ``b'abcdefghijklmnopqrstuvwxyz'``. Uppercase ASCII characters are those byte values in the sequence ``b'ABCDEFGHIJKLMNOPQRSTUVWXYZ'``.
>>> b'HELLO WORLD'.isupper() True >>> b'Hello world'.isupper() False Lowercase ASCII characters are those byte values in the sequence ``b'abcdefghijklmnopqrstuvwxyz'``. Uppercase ASCII characters are those byte values in the sequence ``b'ABCDEFGHIJKLMNOPQRSTUVWXYZ'``.
python, official-docs, cpython, P0
Local_Trusted_Corpus
926de598-ea3d-43b6-9e33-82a0943f93da
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
22,621
supabase-export-v2
ff8c44ddf6c302b2
the exception is propagated and the object does not have a truth value (for example, :data:`NotImplemented`). Here are most of the built-in objects considered false: .. index:: single: None (Built-in object) single: False (Built-in object)
trusted_official_docs
CPython Docs
the exception is propagated and the object does not have a truth value (for example, :data:`NotImplemented`). Here are most of the built-in objects considered false: .. index:: single: None (Built-in object) single: False (Built-in object)
the exception is propagated and the object does not have a truth value (for example, :data:`NotImplemented`). Here are most of the built-in objects considered false: .. index:: single: None (Built-in object) single: False (Built-in object)
python, official-docs, cpython, P0
Local_Trusted_Corpus
92740315-456b-485a-99de-f97820d08f12
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,448
supabase-export-v2
c0b4eb2fdfa64cef
are not :term:`bytes-like objects <bytes-like object>`, including :class:`str` objects. The separator between elements is the contents of the bytes or bytearray object providing this method. .. staticmethod:: bytes.maketrans(from, to, /) bytearray.maketrans(from, to, /)
trusted_official_docs
CPython Docs
are not :term:`bytes-like objects <bytes-like object>`, including :class:`str` objects. The separator between elements is the contents of the bytes or bytearray object providing this method. .. staticmethod:: bytes.maketrans(from, to, /) bytearray.maketrans(from, to, /)
are not :term:`bytes-like objects <bytes-like object>`, including :class:`str` objects. The separator between elements is the contents of the bytes or bytearray object providing this method. .. staticmethod:: bytes.maketrans(from, to, /) bytearray.maketrans(from, to, /)
python, official-docs, cpython, P0
Local_Trusted_Corpus
92eae55e-87b2-43cb-b0db-9c1ef7fc78c4
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,673
supabase-export-v2
56a41afe5cd73673
.. versionchanged:: 3.3 One-dimensional memoryviews can now be sliced. One-dimensional memoryviews with formats 'B', 'b' or 'c' are now :term:`hashable`. .. versionchanged:: 3.4 memoryview is now registered automatically with :class:`collections.abc.Sequence`
trusted_official_docs
CPython Docs
.. versionchanged:: 3.3 One-dimensional memoryviews can now be sliced. One-dimensional memoryviews with formats 'B', 'b' or 'c' are now :term:`hashable`. .. versionchanged:: 3.4 memoryview is now registered automatically with :class:`collections.abc.Sequence`
.. versionchanged:: 3.3 One-dimensional memoryviews can now be sliced. One-dimensional memoryviews with formats 'B', 'b' or 'c' are now :term:`hashable`. .. versionchanged:: 3.4 memoryview is now registered automatically with :class:`collections.abc.Sequence`
python, official-docs, cpython, P0
Local_Trusted_Corpus
93b7f622-afe3-4e3a-beab-6cdc9c774f74
CPython Docs
file://datasets/cpython/Doc/library/stdtypes.rst
unknown
a3cf8bc4-60ee-4147-adb3-d0deb77581ec
23,270
supabase-export-v2
7779e45328ef0552
* Rather than evaluating to a ``str`` object, template string literals evaluate to a :class:`string.templatelib.Template` object. * The :func:`format` protocol is not used. Instead, the format specifier and conversions (if any) are passed to a new :class:`~string.templatelib.Interpolation` object that is created for ...
trusted_official_docs
CPython Docs
* Rather than evaluating to a ``str`` object, template string literals evaluate to a :class:`string.templatelib.Template` object. * The :func:`format` protocol is not used. Instead, the format specifier and conversions (if any) are passed to a new :class:`~string.templatelib.Interpolation` object that is created for ...
* Rather than evaluating to a ``str`` object, template string literals evaluate to a :class:`string.templatelib.Template` object. * The :func:`format` protocol is not used. Instead, the format specifier and conversions (if any) are passed to a new :class:`~string.templatelib.Interpolation` object that is created for ...
python, official-docs, cpython, P0
Local_Trusted_Corpus