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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dc03581a-3f46-400a-9d45-2ed52aba8b0f | CPython Docs | file://datasets/cpython/Doc/library/xml.sax.utils.rst | unknown | 779de2a6-9f51-492c-bdc8-d0ddc3cef40f | 29,636 | supabase-export-v2 | 53e35ecec49e42e9 | >>> print("<element attr=%s>" % quoteattr("ab ' cd \" ef")) <element attr="ab ' cd " ef">
This function is useful when generating attribute values for HTML or any SGML
using the reference concrete syntax. | trusted_official_docs | CPython Docs | >>> print("<element attr=%s>" % quoteattr("ab ' cd \" ef")) <element attr="ab ' cd " ef">
This function is useful when generating attribute values for HTML or any SGML
using the reference concrete syntax. | >>> print("<element attr=%s>" % quoteattr("ab ' cd \" ef")) <element attr="ab ' cd " ef">
This function is useful when generating attribute values for HTML or any SGML
using the reference concrete syntax. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e31bf5f6-af83-4048-8fcb-97ff2c5e24e0 | CPython Docs | file://datasets/cpython/Doc/library/xml.sax.utils.rst | unknown | 779de2a6-9f51-492c-bdc8-d0ddc3cef40f | 29,634 | supabase-export-v2 | 6abd81601720e2aa | .. function:: quoteattr(data, entities={})
Similar to :func:`escape`, but also prepares *data* to be used as an
attribute value. The return value is a quoted version of *data* with any
additional required replacements. :func:`quoteattr` will select a quote
character based on the content of *data*, attempting to avoi... | trusted_official_docs | CPython Docs | .. function:: quoteattr(data, entities={})
Similar to :func:`escape`, but also prepares *data* to be used as an
attribute value. The return value is a quoted version of *data* with any
additional required replacements. :func:`quoteattr` will select a quote
character based on the content of *data*, attempting to avoi... | .. function:: quoteattr(data, entities={})
Similar to :func:`escape`, but also prepares *data* to be used as an
attribute value. The return value is a quoted version of *data* with any
additional required replacements. :func:`quoteattr` will select a quote
character based on the content of *data*, attempting to avoi... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ea9a3b0f-9cd1-4ff3-a931-660d930f0809 | CPython Docs | file://datasets/cpython/Doc/library/xml.sax.utils.rst | unknown | 779de2a6-9f51-492c-bdc8-d0ddc3cef40f | 29,632 | supabase-export-v2 | 4aa64db8e4698f13 | Unescape ``'&'``, ``'<'``, and ``'>'`` in a string of data.
You can unescape other strings of data by passing a dictionary as the optional
*entities* parameter. The keys and values must all be strings; each key will be
replaced with its corresponding value. ``'&'``, ``'<'``, and ``'>'``
are alway... | trusted_official_docs | CPython Docs | Unescape ``'&'``, ``'<'``, and ``'>'`` in a string of data.
You can unescape other strings of data by passing a dictionary as the optional
*entities* parameter. The keys and values must all be strings; each key will be
replaced with its corresponding value. ``'&'``, ``'<'``, and ``'>'``
are alway... | Unescape ``'&'``, ``'<'``, and ``'>'`` in a string of data.
You can unescape other strings of data by passing a dictionary as the optional
*entities* parameter. The keys and values must all be strings; each key will be
replaced with its corresponding value. ``'&'``, ``'<'``, and ``'>'``
are alway... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f40e14d1-8712-4465-add4-89f06c26ec9f | CPython Docs | file://datasets/cpython/Doc/library/xml.sax.utils.rst | unknown | 779de2a6-9f51-492c-bdc8-d0ddc3cef40f | 29,639 | supabase-export-v2 | 84b27ee4e1d4ff35 | if ``False`` (the default) they are emitted as a pair of start/end tags, if set to ``True`` they are emitted as a single self-closed tag.
.. versionchanged:: 3.2
Added the *short_empty_elements* parameter. | trusted_official_docs | CPython Docs | if ``False`` (the default) they are emitted as a pair of start/end tags, if set to ``True`` they are emitted as a single self-closed tag.
.. versionchanged:: 3.2
Added the *short_empty_elements* parameter. | if ``False`` (the default) they are emitted as a pair of start/end tags, if set to ``True`` they are emitted as a single self-closed tag.
.. versionchanged:: 3.2
Added the *short_empty_elements* parameter. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
04c38dea-2c16-4cd9-a3c6-25d4cca51b2c | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,674 | supabase-export-v2 | 38cd2bb786536d30 | Get the smaller of two floating-point values, treating NaNs as missing data.
When both operands are (signed) NaNs or zeroes, return ``nan`` and ``0``
respectively and the sign of the result is implementation-defined, that
is, :func:`!fmin` is not required to be sensitive to the sign of such
operands (see Annex F of ... | trusted_official_docs | CPython Docs | Get the smaller of two floating-point values, treating NaNs as missing data.
When both operands are (signed) NaNs or zeroes, return ``nan`` and ``0``
respectively and the sign of the result is implementation-defined, that
is, :func:`!fmin` is not required to be sensitive to the sign of such
operands (see Annex F of ... | Get the smaller of two floating-point values, treating NaNs as missing data.
When both operands are (signed) NaNs or zeroes, return ``nan`` and ``0``
respectively and the sign of the result is implementation-defined, that
is, :func:`!fmin` is not required to be sensitive to the sign of such
operands (see Annex F of ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
07a996bc-f860-4635-847c-f88d9f22d346 | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,768 | supabase-export-v2 | 0b37dd12d5e13f9a | the underlying C library uses extended precision addition and may occasionally double-round an intermediate sum causing it to be off in its least significant bit.
For further discussion and two alternative approaches, see the `ASPN cookbook
recipes for accurate floating-point summation
<https://code.activestate.com/r... | trusted_official_docs | CPython Docs | the underlying C library uses extended precision addition and may occasionally double-round an intermediate sum causing it to be off in its least significant bit.
For further discussion and two alternative approaches, see the `ASPN cookbook
recipes for accurate floating-point summation
<https://code.activestate.com/r... | the underlying C library uses extended precision addition and may occasionally double-round an intermediate sum causing it to be off in its least significant bit.
For further discussion and two alternative approaches, see the `ASPN cookbook
recipes for accurate floating-point summation
<https://code.activestate.com/r... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
12d225bf-791b-4975-8c83-34b47936ae19 | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,697 | supabase-export-v2 | 095681364f018589 | close is determined according to given absolute and relative tolerances. If no errors occur, the result will be: ``abs(a-b) <= max(rel_tol * max(abs(a), abs(b)), abs_tol)``.
*rel_tol* is the relative tolerance -- it is the maximum allowed difference
between *a* and *b*, relative to the larger absolute value of *a* or ... | trusted_official_docs | CPython Docs | close is determined according to given absolute and relative tolerances. If no errors occur, the result will be: ``abs(a-b) <= max(rel_tol * max(abs(a), abs(b)), abs_tol)``.
*rel_tol* is the relative tolerance -- it is the maximum allowed difference
between *a* and *b*, relative to the larger absolute value of *a* or ... | close is determined according to given absolute and relative tolerances. If no errors occur, the result will be: ``abs(a-b) <= max(rel_tol * max(abs(a), abs(b)), abs_tol)``.
*rel_tol* is the relative tolerance -- it is the maximum allowed difference
between *a* and *b*, relative to the larger absolute value of *a* or ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
15a088ee-7c67-4436-8e3a-955659723706 | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,767 | supabase-export-v2 | ab8ea2b01e5acbd1 | Return an accurate floating-point sum of values in the iterable. Avoids loss of precision by tracking multiple intermediate partial sums.
The algorithm's accuracy depends on IEEE-754 arithmetic guarantees and the
typical case where the rounding mode is half-even. On some non-Windows
builds, the underlying C library u... | trusted_official_docs | CPython Docs | Return an accurate floating-point sum of values in the iterable. Avoids loss of precision by tracking multiple intermediate partial sums.
The algorithm's accuracy depends on IEEE-754 arithmetic guarantees and the
typical case where the rounding mode is half-even. On some non-Windows
builds, the underlying C library u... | Return an accurate floating-point sum of values in the iterable. Avoids loss of precision by tracking multiple intermediate partial sums.
The algorithm's accuracy depends on IEEE-754 arithmetic guarantees and the
typical case where the rounding mode is half-even. On some non-Windows
builds, the underlying C library u... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
176d867f-28b6-489f-b900-d617f194e570 | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,824 | supabase-export-v2 | 8b35ecbfa60a20fc | .. function:: erfc(x)
Return the complementary error function at *x*. The `complementary error
function <https://en.wikipedia.org/wiki/Error_function>`_ is defined as
``1.0 - erf(x)``. It is used for large values of *x* where a subtraction
from one would cause a `loss of significance
<https://en.wikipedia.org/wiki/... | trusted_official_docs | CPython Docs | .. function:: erfc(x)
Return the complementary error function at *x*. The `complementary error
function <https://en.wikipedia.org/wiki/Error_function>`_ is defined as
``1.0 - erf(x)``. It is used for large values of *x* where a subtraction
from one would cause a `loss of significance
<https://en.wikipedia.org/wiki/... | .. function:: erfc(x)
Return the complementary error function at *x*. The `complementary error
function <https://en.wikipedia.org/wiki/Error_function>`_ is defined as
``1.0 - erf(x)``. It is used for large values of *x* where a subtraction
from one would cause a `loss of significance
<https://en.wikipedia.org/wiki/... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
193381f2-66cb-4ef6-a3b2-1ec1ad1ceddb | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,822 | supabase-export-v2 | f3e19fe907f30342 | The :func:`erf` function can be used to compute traditional statistical functions such as the `cumulative standard normal distribution <https://en.wikipedia.org/wiki/Cumulative_distribution_function>`_::
def phi(x):
'Cumulative distribution function for the standard normal distribution'
return (1.0 + erf(x / sqrt(2.0... | trusted_official_docs | CPython Docs | The :func:`erf` function can be used to compute traditional statistical functions such as the `cumulative standard normal distribution <https://en.wikipedia.org/wiki/Cumulative_distribution_function>`_::
def phi(x):
'Cumulative distribution function for the standard normal distribution'
return (1.0 + erf(x / sqrt(2.0... | The :func:`erf` function can be used to compute traditional statistical functions such as the `cumulative standard normal distribution <https://en.wikipedia.org/wiki/Cumulative_distribution_function>`_::
def phi(x):
'Cumulative distribution function for the standard normal distribution'
return (1.0 + erf(x / sqrt(2.0... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
249ed637-be15-40d5-9de7-ab16cc4166d2 | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,650 | supabase-export-v2 | 8fd90475a58be2ff | The following functions are provided by this module. Except when explicitly noted otherwise, all return values are floats.
==================================================== ============================================
**Floating point arithmetic**
---------------------------------------------------------------------... | trusted_official_docs | CPython Docs | The following functions are provided by this module. Except when explicitly noted otherwise, all return values are floats.
==================================================== ============================================
**Floating point arithmetic**
---------------------------------------------------------------------... | The following functions are provided by this module. Except when explicitly noted otherwise, all return values are floats.
==================================================== ============================================
**Floating point arithmetic**
---------------------------------------------------------------------... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3b125364-6fef-41ec-b459-9da4729307fc | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,684 | supabase-export-v2 | a5cd7d46a3d6a281 | x)`` raise :exc:`ValueError` for any non-NaN *x*. If the result of the remainder operation is zero, that zero will have the same sign as *x*.
On platforms using IEEE 754 binary floating point, the result of this
operation is always exactly representable: no rounding error is introduced. | trusted_official_docs | CPython Docs | x)`` raise :exc:`ValueError` for any non-NaN *x*. If the result of the remainder operation is zero, that zero will have the same sign as *x*.
On platforms using IEEE 754 binary floating point, the result of this
operation is always exactly representable: no rounding error is introduced. | x)`` raise :exc:`ValueError` for any non-NaN *x*. If the result of the remainder operation is zero, that zero will have the same sign as *x*.
On platforms using IEEE 754 binary floating point, the result of this
operation is always exactly representable: no rounding error is introduced. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3bc10427-a39b-4c0f-8918-7023a7271147 | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,658 | supabase-export-v2 | 6715d67f0b7fe843 | <https://en.wikipedia.org/wiki/Error_function>`_ at *x* :func:`gamma(x) <gamma>` `Gamma function <https://en.wikipedia.org/wiki/Gamma_function>`_ at *x* :func:`lgamma(x) <lgamma>` Natural logarithm of the absolute value of the `Gamma function <https://en.wikipedia.org/wiki/Gamma_function>`_ at *x*
**Constants**
-------... | trusted_official_docs | CPython Docs | <https://en.wikipedia.org/wiki/Error_function>`_ at *x* :func:`gamma(x) <gamma>` `Gamma function <https://en.wikipedia.org/wiki/Gamma_function>`_ at *x* :func:`lgamma(x) <lgamma>` Natural logarithm of the absolute value of the `Gamma function <https://en.wikipedia.org/wiki/Gamma_function>`_ at *x*
**Constants**
-------... | <https://en.wikipedia.org/wiki/Error_function>`_ at *x* :func:`gamma(x) <gamma>` `Gamma function <https://en.wikipedia.org/wiki/Gamma_function>`_ at *x* :func:`lgamma(x) <lgamma>` Natural logarithm of the absolute value of the `Gamma function <https://en.wikipedia.org/wiki/Gamma_function>`_ at *x*
**Constants**
-------... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3f7d735a-c7d1-477a-ad6e-478d770e26c4 | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,761 | supabase-export-v2 | 16a0dddec4e693a0 | .. function:: dist(p, q)
Return the Euclidean distance between two points *p* and *q*, each
given as a sequence (or iterable) of coordinates. The two points
must have the same dimension. | trusted_official_docs | CPython Docs | .. function:: dist(p, q)
Return the Euclidean distance between two points *p* and *q*, each
given as a sequence (or iterable) of coordinates. The two points
must have the same dimension. | .. function:: dist(p, q)
Return the Euclidean distance between two points *p* and *q*, each
given as a sequence (or iterable) of coordinates. The two points
must have the same dimension. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
40f2d336-7f97-4363-8e84-cb6da11ef827 | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,771 | supabase-export-v2 | c3045170b59d9cbb | the Euclidean norm, ``sqrt(sum(x**2 for x in coordinates))``. This is the length of the vector from the origin to the point given by the coordinates.
For a two dimensional point ``(x, y)``, this is equivalent to computing
the hypotenuse of a right triangle using the Pythagorean theorem,
``sqrt(x*x + y*y)``. | trusted_official_docs | CPython Docs | the Euclidean norm, ``sqrt(sum(x**2 for x in coordinates))``. This is the length of the vector from the origin to the point given by the coordinates.
For a two dimensional point ``(x, y)``, this is equivalent to computing
the hypotenuse of a right triangle using the Pythagorean theorem,
``sqrt(x*x + y*y)``. | the Euclidean norm, ``sqrt(sum(x**2 for x in coordinates))``. This is the length of the vector from the origin to the point given by the coordinates.
For a two dimensional point ``(x, y)``, this is equivalent to computing
the hypotenuse of a right triangle using the Pythagorean theorem,
``sqrt(x*x + y*y)``. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
44b54d38-2c2f-4a09-a0d8-40abdce0408f | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,755 | supabase-export-v2 | 367159a057e1031a | NaN. If both *x* and *y* are finite, *x* is negative, and *y* is not an integer then ``pow(x, y)`` is undefined, and raises :exc:`ValueError`.
Unlike the built-in ``**`` operator, :func:`math.pow` converts both
its arguments to type :class:`float`. Use ``**`` or the built-in
:func:`pow` function for computing exact i... | trusted_official_docs | CPython Docs | NaN. If both *x* and *y* are finite, *x* is negative, and *y* is not an integer then ``pow(x, y)`` is undefined, and raises :exc:`ValueError`.
Unlike the built-in ``**`` operator, :func:`math.pow` converts both
its arguments to type :class:`float`. Use ``**`` or the built-in
:func:`pow` function for computing exact i... | NaN. If both *x* and *y* are finite, *x* is negative, and *y* is not an integer then ``pow(x, y)`` is undefined, and raises :exc:`ValueError`.
Unlike the built-in ``**`` operator, :func:`math.pow` converts both
its arguments to type :class:`float`. Use ``**`` or the built-in
:func:`pow` function for computing exact i... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4e428c1a-a3a4-42c8-be74-ec0c0d49e9db | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,686 | supabase-export-v2 | 0256ef924ee8a83c | .. function:: trunc(x)
Return *x* with the fractional part
removed, leaving the integer part. This rounds toward 0: ``trunc()`` is
equivalent to :func:`floor` for positive *x*, and equivalent to :func:`ceil`
for negative *x*. If *x* is not a float, delegates to :meth:`x.__trunc__
<object.__trunc__>`, which should r... | trusted_official_docs | CPython Docs | .. function:: trunc(x)
Return *x* with the fractional part
removed, leaving the integer part. This rounds toward 0: ``trunc()`` is
equivalent to :func:`floor` for positive *x*, and equivalent to :func:`ceil`
for negative *x*. If *x* is not a float, delegates to :meth:`x.__trunc__
<object.__trunc__>`, which should r... | .. function:: trunc(x)
Return *x* with the fractional part
removed, leaving the integer part. This rounds toward 0: ``trunc()`` is
equivalent to :func:`floor` for positive *x*, and equivalent to :func:`ceil`
for negative *x*. If *x* is not a float, delegates to :meth:`x.__trunc__
<object.__trunc__>`, which should r... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
57b042f7-f662-4374-b6e2-5037d200298e | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,740 | supabase-export-v2 | d738083be1df6339 | ``exp(x) - 1`` can result in a `significant loss of precision <https://en.wikipedia.org/wiki/Loss_of_significance>`_\; the :func:`expm1` function provides a way to compute this quantity to full precision:
>>> from math import exp, expm1
>>> exp(1e-5) - 1 # gives result accurate to 11 places
1.0000050000069649e-05
>>... | trusted_official_docs | CPython Docs | ``exp(x) - 1`` can result in a `significant loss of precision <https://en.wikipedia.org/wiki/Loss_of_significance>`_\; the :func:`expm1` function provides a way to compute this quantity to full precision:
>>> from math import exp, expm1
>>> exp(1e-5) - 1 # gives result accurate to 11 places
1.0000050000069649e-05
>>... | ``exp(x) - 1`` can result in a `significant loss of precision <https://en.wikipedia.org/wiki/Loss_of_significance>`_\; the :func:`expm1` function provides a way to compute this quantity to full precision:
>>> from math import exp, expm1
>>> exp(1e-5) - 1 # gives result accurate to 11 places
1.0000050000069649e-05
>>... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5f7bd36a-0ff0-43ae-9c48-d6b9a282f768 | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,693 | supabase-export-v2 | ed1ca1481f4c7dbe | returns ``(0.0, 0)``, otherwise ``0.5 <= abs(m) < 1``. This is used to "pick apart" the internal representation of a float in a portable way.
Note that :func:`frexp` has a different call/return pattern
than its C equivalents: it takes a single argument and return a pair of
values, rather than returning its second ret... | trusted_official_docs | CPython Docs | returns ``(0.0, 0)``, otherwise ``0.5 <= abs(m) < 1``. This is used to "pick apart" the internal representation of a float in a portable way.
Note that :func:`frexp` has a different call/return pattern
than its C equivalents: it takes a single argument and return a pair of
values, rather than returning its second ret... | returns ``(0.0, 0)``, otherwise ``0.5 <= abs(m) < 1``. This is used to "pick apart" the internal representation of a float in a portable way.
Note that :func:`frexp` has a different call/return pattern
than its C equivalents: it takes a single argument and return a pair of
values, rather than returning its second ret... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
608d2320-a202-43f1-b16e-5fe6ed946a36 | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,719 | supabase-export-v2 | 78bf83ce70f758cd | Examples:
* ``math.nextafter(x, math.inf)`` goes up: towards positive infinity. * ``math.nextafter(x, -math.inf)`` goes down: towards minus infinity. * ``math.nextafter(x, 0.0)`` goes towards zero. * ``math.nextafter(x, math.copysign(math.inf, x))`` goes away from zero. | trusted_official_docs | CPython Docs | Examples:
* ``math.nextafter(x, math.inf)`` goes up: towards positive infinity. * ``math.nextafter(x, -math.inf)`` goes down: towards minus infinity. * ``math.nextafter(x, 0.0)`` goes towards zero. * ``math.nextafter(x, math.copysign(math.inf, x))`` goes away from zero. | Examples:
* ``math.nextafter(x, math.inf)`` goes up: towards positive infinity. * ``math.nextafter(x, -math.inf)`` goes down: towards minus infinity. * ``math.nextafter(x, 0.0)`` goes towards zero. * ``math.nextafter(x, math.copysign(math.inf, x))`` goes away from zero. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
625d6823-55c1-4e3f-aa76-928dad1d8c7f | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,680 | supabase-export-v2 | 075368914e8982e7 | Return the fractional and integer parts of *x*. Both results carry the sign of *x* and are floats.
Note that :func:`modf` has a different call/return pattern
than its C equivalents: it takes a single argument and return a pair of
values, rather than returning its second return value through an 'output
parameter' (th... | trusted_official_docs | CPython Docs | Return the fractional and integer parts of *x*. Both results carry the sign of *x* and are floats.
Note that :func:`modf` has a different call/return pattern
than its C equivalents: it takes a single argument and return a pair of
values, rather than returning its second return value through an 'output
parameter' (th... | Return the fractional and integer parts of *x*. Both results carry the sign of *x* and are floats.
Note that :func:`modf` has a different call/return pattern
than its C equivalents: it takes a single argument and return a pair of
values, rather than returning its second return value through an 'output
parameter' (th... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
64b40017-d674-4a22-9dfe-02f3f6ae011e | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,735 | supabase-export-v2 | 7c652d718498e048 | .. function:: exp(x)
Return *e* raised to the power *x*, where *e* = 2.718281... is the base
of natural logarithms. This is usually more accurate than ``math.e ** x``
or ``pow(math.e, x)``. | trusted_official_docs | CPython Docs | .. function:: exp(x)
Return *e* raised to the power *x*, where *e* = 2.718281... is the base
of natural logarithms. This is usually more accurate than ``math.e ** x``
or ``pow(math.e, x)``. | .. function:: exp(x)
Return *e* raised to the power *x*, where *e* = 2.718281... is the base
of natural logarithms. This is usually more accurate than ``math.e ** x``
or ``pow(math.e, x)``. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
678b3a3e-f6fa-48b6-b830-6035921b46ec | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,688 | supabase-export-v2 | ed8254dcea966fd4 | of precision (the same as the platform C double type), in which case any float *x* with ``abs(x) >= 2**52`` necessarily has no fractional bits.
Floating point manipulation functions
------------------------------------- | trusted_official_docs | CPython Docs | of precision (the same as the platform C double type), in which case any float *x* with ``abs(x) >= 2**52`` necessarily has no fractional bits.
Floating point manipulation functions
------------------------------------- | of precision (the same as the platform C double type), in which case any float *x* with ``abs(x) >= 2**52`` necessarily has no fractional bits.
Floating point manipulation functions
------------------------------------- | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
6b21fcfe-74fd-4f1c-925e-4b8a6bc7377b | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,654 | supabase-export-v2 | 848834cd1fbc3342 | start) <prod>` Product of elements in the input *iterable* with a *start* value :func:`sumprod(p, q) <sumprod>` Sum of products from two iterables *p* and *q*
**Angular conversion**
--------------------------------------------------------------------------------------------------
:func:`degrees(x) <degrees>` Convert an... | trusted_official_docs | CPython Docs | start) <prod>` Product of elements in the input *iterable* with a *start* value :func:`sumprod(p, q) <sumprod>` Sum of products from two iterables *p* and *q*
**Angular conversion**
--------------------------------------------------------------------------------------------------
:func:`degrees(x) <degrees>` Convert an... | start) <prod>` Product of elements in the input *iterable* with a *start* value :func:`sumprod(p, q) <sumprod>` Sum of products from two iterables *p* and *q*
**Angular conversion**
--------------------------------------------------------------------------------------------------
:func:`degrees(x) <degrees>` Convert an... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
6c9b79a3-cf2f-4f05-bdfa-8c1e34da8f27 | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,649 | supabase-export-v2 | 6b84b2b9d03b3802 | of the unexpected complex number used as a parameter, so that the programmer can determine how and why it was generated in the first place.
The following functions are provided by this module. Except when explicitly
noted otherwise, all return values are floats. | trusted_official_docs | CPython Docs | of the unexpected complex number used as a parameter, so that the programmer can determine how and why it was generated in the first place.
The following functions are provided by this module. Except when explicitly
noted otherwise, all return values are floats. | of the unexpected complex number used as a parameter, so that the programmer can determine how and why it was generated in the first place.
The following functions are provided by this module. Except when explicitly
noted otherwise, all return values are floats. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
6e4d27eb-4fe2-4244-9c9a-9e3f1a880443 | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,653 | supabase-export-v2 | ce4cf87c67e76830 | Base-2 logarithm of *x* :func:`log10(x) <log10>` Base-10 logarithm of *x* :func:`pow(x, y) <math.pow>` *x* raised to the power *y* :func:`sqrt(x) <sqrt>` Square root of *x*
**Summation and product functions**
--------------------------------------------------------------------------------------------------
:func:`dist(... | trusted_official_docs | CPython Docs | Base-2 logarithm of *x* :func:`log10(x) <log10>` Base-10 logarithm of *x* :func:`pow(x, y) <math.pow>` *x* raised to the power *y* :func:`sqrt(x) <sqrt>` Square root of *x*
**Summation and product functions**
--------------------------------------------------------------------------------------------------
:func:`dist(... | Base-2 logarithm of *x* :func:`log10(x) <log10>` Base-10 logarithm of *x* :func:`pow(x, y) <math.pow>` *x* raised to the power *y* :func:`sqrt(x) <sqrt>` Square root of *x*
**Summation and product functions**
--------------------------------------------------------------------------------------------------
:func:`dist(... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
73b50a38-8e65-48ea-a099-0fb03ff773e2 | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,797 | supabase-export-v2 | fcc8021a5bd4ad31 | .. function:: atan2(y, x)
Return ``atan(y / x)``, in radians. The result is between ``-pi`` and ``pi``. The vector in the plane from the origin to point ``(x, y)`` makes this angle
with the positive X axis. The point of :func:`atan2` is that the signs of both
inputs are known to it, so it can compute the correct quad... | trusted_official_docs | CPython Docs | .. function:: atan2(y, x)
Return ``atan(y / x)``, in radians. The result is between ``-pi`` and ``pi``. The vector in the plane from the origin to point ``(x, y)`` makes this angle
with the positive X axis. The point of :func:`atan2` is that the signs of both
inputs are known to it, so it can compute the correct quad... | .. function:: atan2(y, x)
Return ``atan(y / x)``, in radians. The result is between ``-pi`` and ``pi``. The vector in the plane from the origin to point ``(x, y)`` makes this angle
with the positive X axis. The point of :func:`atan2` is that the signs of both
inputs are known to it, so it can compute the correct quad... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
74285fa9-1357-4af9-82a4-8a2a06cf5a64 | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,774 | supabase-export-v2 | 92c33c789eaa5d5e | the maximum error is under 1 ulp (unit in the last place). More typically, the result is almost always correctly rounded to within 1/2 ulp.
.. function:: prod(iterable, *, start=1) | trusted_official_docs | CPython Docs | the maximum error is under 1 ulp (unit in the last place). More typically, the result is almost always correctly rounded to within 1/2 ulp.
.. function:: prod(iterable, *, start=1) | the maximum error is under 1 ulp (unit in the last place). More typically, the result is almost always correctly rounded to within 1/2 ulp.
.. function:: prod(iterable, *, start=1) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
772bb354-7a9e-48e4-b1b2-810dbb72c96d | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,694 | supabase-export-v2 | 5f4846ae4b421786 | argument and return a pair of values, rather than returning its second return value through an 'output parameter' (there is no such thing in Python).
.. function:: isclose(a, b, *, rel_tol=1e-09, abs_tol=0.0) | trusted_official_docs | CPython Docs | argument and return a pair of values, rather than returning its second return value through an 'output parameter' (there is no such thing in Python).
.. function:: isclose(a, b, *, rel_tol=1e-09, abs_tol=0.0) | argument and return a pair of values, rather than returning its second return value through an 'output parameter' (there is no such thing in Python).
.. function:: isclose(a, b, *, rel_tol=1e-09, abs_tol=0.0) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
79faf420-e13b-4f47-b403-409a4b2535a6 | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,699 | supabase-export-v2 | 8446c203be4cc5d7 | rel_tol * abs(x)``, which is ``False`` for any nonzero ``x`` and *rel_tol* less than ``1.0``. So add an appropriate positive *abs_tol* argument to the call.
The IEEE 754 special values of ``NaN``, ``inf``, and ``-inf`` will be
handled according to IEEE rules. Specifically, ``NaN`` is not considered
close to any other... | trusted_official_docs | CPython Docs | rel_tol * abs(x)``, which is ``False`` for any nonzero ``x`` and *rel_tol* less than ``1.0``. So add an appropriate positive *abs_tol* argument to the call.
The IEEE 754 special values of ``NaN``, ``inf``, and ``-inf`` will be
handled according to IEEE rules. Specifically, ``NaN`` is not considered
close to any other... | rel_tol * abs(x)``, which is ``False`` for any nonzero ``x`` and *rel_tol* less than ``1.0``. So add an appropriate positive *abs_tol* argument to the call.
The IEEE 754 special values of ``NaN``, ``inf``, and ``-inf`` will be
handled according to IEEE rules. Specifically, ``NaN`` is not considered
close to any other... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7ad0a2d1-76eb-4fa9-83f6-cc51e98ebd41 | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,687 | supabase-export-v2 | 37fa5b2f52178f6e | positive *x*, and equivalent to :func:`ceil` for negative *x*. If *x* is not a float, delegates to :meth:`x.__trunc__ <object.__trunc__>`, which should return an :class:`~numbers.Integral` value.
For the :func:`ceil`, :func:`floor`, and :func:`modf` functions, note that *all*
floating-point numbers of sufficiently larg... | trusted_official_docs | CPython Docs | positive *x*, and equivalent to :func:`ceil` for negative *x*. If *x* is not a float, delegates to :meth:`x.__trunc__ <object.__trunc__>`, which should return an :class:`~numbers.Integral` value.
For the :func:`ceil`, :func:`floor`, and :func:`modf` functions, note that *all*
floating-point numbers of sufficiently larg... | positive *x*, and equivalent to :func:`ceil` for negative *x*. If *x* is not a float, delegates to :meth:`x.__trunc__ <object.__trunc__>`, which should return an :class:`~numbers.Integral` value.
For the :func:`ceil`, :func:`floor`, and :func:`modf` functions, note that *all*
floating-point numbers of sufficiently larg... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
84156cde-9d27-4934-8543-81f120f9449f | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,756 | supabase-export-v2 | 14ca11725c8553e7 | Unlike the built-in ``**`` operator, :func:`math.pow` converts both its arguments to type :class:`float`. Use ``**`` or the built-in :func:`pow` function for computing exact integer powers.
.. versionchanged:: 3.11
The special cases ``pow(0.0, -inf)`` and ``pow(-0.0, -inf)`` were
changed to return ``inf`` instead of ... | trusted_official_docs | CPython Docs | Unlike the built-in ``**`` operator, :func:`math.pow` converts both its arguments to type :class:`float`. Use ``**`` or the built-in :func:`pow` function for computing exact integer powers.
.. versionchanged:: 3.11
The special cases ``pow(0.0, -inf)`` and ``pow(-0.0, -inf)`` were
changed to return ``inf`` instead of ... | Unlike the built-in ``**`` operator, :func:`math.pow` converts both its arguments to type :class:`float`. Use ``**`` or the built-in :func:`pow` function for computing exact integer powers.
.. versionchanged:: 3.11
The special cases ``pow(0.0, -inf)`` and ``pow(-0.0, -inf)`` were
changed to return ``inf`` instead of ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8d631db5-e4c6-4409-b85c-31351f375880 | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,648 | supabase-export-v2 | 9159eed5e7d6fbd2 | This module provides access to common mathematical functions and constants, including those defined by the C standard.
These functions cannot be used with complex numbers; use the functions of the
same name from the :mod:`cmath` module if you require support for complex
numbers. The distinction between functions which ... | trusted_official_docs | CPython Docs | This module provides access to common mathematical functions and constants, including those defined by the C standard.
These functions cannot be used with complex numbers; use the functions of the
same name from the :mod:`cmath` module if you require support for complex
numbers. The distinction between functions which ... | This module provides access to common mathematical functions and constants, including those defined by the C standard.
These functions cannot be used with complex numbers; use the functions of the
same name from the :mod:`cmath` module if you require support for complex
numbers. The distinction between functions which ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
90b515be-97ec-45cd-a906-6fce8e0db53e | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,754 | supabase-export-v2 | cf015de68964a332 | .. function:: pow(x, y)
Return *x* raised to the power *y*. Exceptional cases follow
the IEEE 754 standard as far as possible. In particular,
``pow(1.0, x)`` and ``pow(x, 0.0)`` always return ``1.0``, even
when *x* is a zero or a NaN. If both *x* and *y* are finite,
*x* is negative, and *y* is not an integer then `... | trusted_official_docs | CPython Docs | .. function:: pow(x, y)
Return *x* raised to the power *y*. Exceptional cases follow
the IEEE 754 standard as far as possible. In particular,
``pow(1.0, x)`` and ``pow(x, 0.0)`` always return ``1.0``, even
when *x* is a zero or a NaN. If both *x* and *y* are finite,
*x* is negative, and *y* is not an integer then `... | .. function:: pow(x, y)
Return *x* raised to the power *y*. Exceptional cases follow
the IEEE 754 standard as far as possible. In particular,
``pow(1.0, x)`` and ``pow(x, 0.0)`` always return ``1.0``, even
when *x* is a zero or a NaN. If both *x* and *y* are finite,
*x* is negative, and *y* is not an integer then `... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9254166a-bf63-4ab8-8475-2a051199eb3b | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,773 | supabase-export-v2 | faa29e6b7e29ca71 | .. versionchanged:: 3.8 Added support for n-dimensional points. Formerly, only the two dimensional case was supported.
.. versionchanged:: 3.10
Improved the algorithm's accuracy so that the maximum error is
under 1 ulp (unit in the last place). More typically, the result
is almost always correctly rounded to within ... | trusted_official_docs | CPython Docs | .. versionchanged:: 3.8 Added support for n-dimensional points. Formerly, only the two dimensional case was supported.
.. versionchanged:: 3.10
Improved the algorithm's accuracy so that the maximum error is
under 1 ulp (unit in the last place). More typically, the result
is almost always correctly rounded to within ... | .. versionchanged:: 3.8 Added support for n-dimensional points. Formerly, only the two dimensional case was supported.
.. versionchanged:: 3.10
Improved the algorithm's accuracy so that the maximum error is
under 1 ulp (unit in the last place). More typically, the result
is almost always correctly rounded to within ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
96cbdccc-be71-4369-938a-37194f8627fc | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,865 | supabase-export-v2 | 19b0e912b224f53e | .. impl-detail::
The :mod:`!math` module consists mostly of thin wrappers around the platform C
math library functions. Behavior in exceptional cases follows Annex F of
the C99 standard where appropriate. The current implementation will raise
:exc:`ValueError` for invalid operations like ``sqrt(-1.0)`` or ``log(0.0)... | trusted_official_docs | CPython Docs | .. impl-detail::
The :mod:`!math` module consists mostly of thin wrappers around the platform C
math library functions. Behavior in exceptional cases follows Annex F of
the C99 standard where appropriate. The current implementation will raise
:exc:`ValueError` for invalid operations like ``sqrt(-1.0)`` or ``log(0.0)... | .. impl-detail::
The :mod:`!math` module consists mostly of thin wrappers around the platform C
math library functions. Behavior in exceptional cases follows Annex F of
the C99 standard where appropriate. The current implementation will raise
:exc:`ValueError` for invalid operations like ``sqrt(-1.0)`` or ``log(0.0)... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9c357ecf-3a37-494c-be0a-adb1ee029ee5 | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,861 | supabase-export-v2 | 799c98ba1fa3cd8e | value, including themselves. To check whether a number is a NaN, use the :func:`isnan` function to test for NaNs instead of ``is`` or ``==``. Example:
>>> import math
>>> math.nan == math.nan
False
>>> float('nan') == float('nan')
False
>>> math.isnan(math.nan)
True
>>> math.isnan(float('nan'))
True | trusted_official_docs | CPython Docs | value, including themselves. To check whether a number is a NaN, use the :func:`isnan` function to test for NaNs instead of ``is`` or ``==``. Example:
>>> import math
>>> math.nan == math.nan
False
>>> float('nan') == float('nan')
False
>>> math.isnan(math.nan)
True
>>> math.isnan(float('nan'))
True | value, including themselves. To check whether a number is a NaN, use the :func:`isnan` function to test for NaNs instead of ``is`` or ``==``. Example:
>>> import math
>>> math.nan == math.nan
False
>>> float('nan') == float('nan')
False
>>> math.isnan(math.nan)
True
>>> math.isnan(float('nan'))
True | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9ca601c7-d7ee-4ed0-97d5-959838a35eab | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,652 | supabase-export-v2 | b40d8e9cace25631 | *steps* steps after *x* towards *y* :func:`signbit(x) <signbit>` Check if *x* is a negative number :func:`ulp(x) <ulp>` Value of the least significant bit of *x*
**Power, exponential and logarithmic functions**
--------------------------------------------------------------------------------------------------
:func:`cbr... | trusted_official_docs | CPython Docs | *steps* steps after *x* towards *y* :func:`signbit(x) <signbit>` Check if *x* is a negative number :func:`ulp(x) <ulp>` Value of the least significant bit of *x*
**Power, exponential and logarithmic functions**
--------------------------------------------------------------------------------------------------
:func:`cbr... | *steps* steps after *x* towards *y* :func:`signbit(x) <signbit>` Check if *x* is a negative number :func:`ulp(x) <ulp>` Value of the least significant bit of *x*
**Power, exponential and logarithmic functions**
--------------------------------------------------------------------------------------------------
:func:`cbr... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9dbdf48b-a351-4e97-9e6a-ce9a7da870c5 | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,665 | supabase-export-v2 | beef61e61c4e58c6 | .. function:: floor(x)
Return the floor of *x*, the largest integer less than or equal to *x*. If
*x* is not a float, delegates to :meth:`x.__floor__ <object.__floor__>`, which
should return an :class:`~numbers.Integral` value. | trusted_official_docs | CPython Docs | .. function:: floor(x)
Return the floor of *x*, the largest integer less than or equal to *x*. If
*x* is not a float, delegates to :meth:`x.__floor__ <object.__floor__>`, which
should return an :class:`~numbers.Integral` value. | .. function:: floor(x)
Return the floor of *x*, the largest integer less than or equal to *x*. If
*x* is not a float, delegates to :meth:`x.__floor__ <object.__floor__>`, which
should return an :class:`~numbers.Integral` value. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9eb1df83-13a8-4f05-b36b-4f2ce3fd2f81 | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,677 | supabase-export-v2 | ac01a779c45aa9f9 | ``-1e-100``, but the result of Python's ``-1e-100 % 1e100`` is ``1e100-1e-100``, which cannot be represented exactly as a float, and rounds to the surprising ``1e100``.
For
this reason, function :func:`fmod` is generally preferred when working with
floats, while Python's ``x % y`` is preferred when working with integ... | trusted_official_docs | CPython Docs | ``-1e-100``, but the result of Python's ``-1e-100 % 1e100`` is ``1e100-1e-100``, which cannot be represented exactly as a float, and rounds to the surprising ``1e100``.
For
this reason, function :func:`fmod` is generally preferred when working with
floats, while Python's ``x % y`` is preferred when working with integ... | ``-1e-100``, but the result of Python's ``-1e-100 % 1e100`` is ``1e100-1e-100``, which cannot be represented exactly as a float, and rounds to the surprising ``1e100``.
For
this reason, function :func:`fmod` is generally preferred when working with
floats, while Python's ``x % y`` is preferred when working with integ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a3e1c234-73d2-4ebc-9392-69da5ae21a7b | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,682 | supabase-export-v2 | 65f565a55cd3d9b0 | .. function:: remainder(x, y)
Return the IEEE 754-style remainder of *x* with respect to *y*. For
finite *x* and finite nonzero *y*, this is the difference ``x - n*y``,
where ``n`` is the closest integer to the exact value of the quotient ``x /
y``. If ``x / y`` is exactly halfway between two consecutive integers, t... | trusted_official_docs | CPython Docs | .. function:: remainder(x, y)
Return the IEEE 754-style remainder of *x* with respect to *y*. For
finite *x* and finite nonzero *y*, this is the difference ``x - n*y``,
where ``n`` is the closest integer to the exact value of the quotient ``x /
y``. If ``x / y`` is exactly halfway between two consecutive integers, t... | .. function:: remainder(x, y)
Return the IEEE 754-style remainder of *x* with respect to *y*. For
finite *x* and finite nonzero *y*, this is the difference ``x - n*y``,
where ``n`` is the closest integer to the exact value of the quotient ``x /
y``. If ``x / y`` is exactly halfway between two consecutive integers, t... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a81a2b1e-d358-430b-8f4c-4606bb0e9c05 | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,667 | supabase-export-v2 | 2d313c38acc2115c | .. function:: fma(x, y, z)
Fused multiply-add operation. Return ``(x * y) + z``, computed as though with
infinite precision and range followed by a single round to the ``float``
format. This operation often provides better accuracy than the direct
expression ``(x * y) + z``. | trusted_official_docs | CPython Docs | .. function:: fma(x, y, z)
Fused multiply-add operation. Return ``(x * y) + z``, computed as though with
infinite precision and range followed by a single round to the ``float``
format. This operation often provides better accuracy than the direct
expression ``(x * y) + z``. | .. function:: fma(x, y, z)
Fused multiply-add operation. Return ``(x * y) + z``, computed as though with
infinite precision and range followed by a single round to the ``float``
format. This operation often provides better accuracy than the direct
expression ``(x * y) + z``. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a8a7e17e-9133-414d-8eaf-6bf25314dc24 | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,866 | supabase-export-v2 | bfded4b1f615d217 | functions will return a NaN, but (again following C99 Annex F) there are some exceptions to this rule, for example ``pow(float('nan'), 0.0)`` or ``hypot(float('nan'), float('inf'))``.
Note that Python makes no effort to distinguish signaling NaNs from
quiet NaNs, and behavior for signaling NaNs remains unspecified. Ty... | trusted_official_docs | CPython Docs | functions will return a NaN, but (again following C99 Annex F) there are some exceptions to this rule, for example ``pow(float('nan'), 0.0)`` or ``hypot(float('nan'), float('inf'))``.
Note that Python makes no effort to distinguish signaling NaNs from
quiet NaNs, and behavior for signaling NaNs remains unspecified. Ty... | functions will return a NaN, but (again following C99 Annex F) there are some exceptions to this rule, for example ``pow(float('nan'), 0.0)`` or ``hypot(float('nan'), float('inf'))``.
Note that Python makes no effort to distinguish signaling NaNs from
quiet NaNs, and behavior for signaling NaNs remains unspecified. Ty... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ac14e2c3-554d-4ba6-a866-0561b7da4013 | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,666 | supabase-export-v2 | 97cff21ff476a17a | the largest integer less than or equal to *x*. If *x* is not a float, delegates to :meth:`x.__floor__ <object.__floor__>`, which should return an :class:`~numbers.Integral` value.
.. function:: fma(x, y, z) | trusted_official_docs | CPython Docs | the largest integer less than or equal to *x*. If *x* is not a float, delegates to :meth:`x.__floor__ <object.__floor__>`, which should return an :class:`~numbers.Integral` value.
.. function:: fma(x, y, z) | the largest integer less than or equal to *x*. If *x* is not a float, delegates to :meth:`x.__floor__ <object.__floor__>`, which should return an :class:`~numbers.Integral` value.
.. function:: fma(x, y, z) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b13e2bb4-924c-42fe-860a-a5f0c459d033 | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,772 | supabase-export-v2 | 0a223b47940194cc | For a two dimensional point ``(x, y)``, this is equivalent to computing the hypotenuse of a right triangle using the Pythagorean theorem, ``sqrt(x*x + y*y)``.
.. versionchanged:: 3.8
Added support for n-dimensional points. Formerly, only the two
dimensional case was supported. | trusted_official_docs | CPython Docs | For a two dimensional point ``(x, y)``, this is equivalent to computing the hypotenuse of a right triangle using the Pythagorean theorem, ``sqrt(x*x + y*y)``.
.. versionchanged:: 3.8
Added support for n-dimensional points. Formerly, only the two
dimensional case was supported. | For a two dimensional point ``(x, y)``, this is equivalent to computing the hypotenuse of a right triangle using the Pythagorean theorem, ``sqrt(x*x + y*y)``.
.. versionchanged:: 3.8
Added support for n-dimensional points. Formerly, only the two
dimensional case was supported. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b4c66f3b-5051-4214-8ecf-57c2ca8fa363 | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,683 | supabase-export-v2 | 1edc416c3d017525 | two consecutive integers, the nearest *even* integer is used for ``n``. The remainder ``r = remainder(x, y)`` thus always satisfies ``abs(r) <= 0.5 * abs(y)``.
Special cases follow IEEE 754: in particular, ``remainder(x, math.inf)`` is
*x* for any finite *x*, and ``remainder(x, 0)`` and
``remainder(math.inf, x)`` rai... | trusted_official_docs | CPython Docs | two consecutive integers, the nearest *even* integer is used for ``n``. The remainder ``r = remainder(x, y)`` thus always satisfies ``abs(r) <= 0.5 * abs(y)``.
Special cases follow IEEE 754: in particular, ``remainder(x, math.inf)`` is
*x* for any finite *x*, and ``remainder(x, 0)`` and
``remainder(math.inf, x)`` rai... | two consecutive integers, the nearest *even* integer is used for ``n``. The remainder ``r = remainder(x, y)`` thus always satisfies ``abs(r) <= 0.5 * abs(y)``.
Special cases follow IEEE 754: in particular, ``remainder(x, math.inf)`` is
*x* for any finite *x*, and ``remainder(x, 0)`` and
``remainder(math.inf, x)`` rai... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b77b3a52-b9b5-4432-9a2f-7f169fc60284 | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,698 | supabase-export-v2 | fa3e1f34166c56d2 | tolerance is ``1e-09``, which assures that the two values are the same within about 9 decimal digits. *rel_tol* must be nonnegative and less than ``1.0``.
*abs_tol* is the absolute tolerance; it defaults to ``0.0`` and it must be
nonnegative. When comparing ``x`` to ``0.0``, ``isclose(x, 0)`` is computed
as ``abs(x) ... | trusted_official_docs | CPython Docs | tolerance is ``1e-09``, which assures that the two values are the same within about 9 decimal digits. *rel_tol* must be nonnegative and less than ``1.0``.
*abs_tol* is the absolute tolerance; it defaults to ``0.0`` and it must be
nonnegative. When comparing ``x`` to ``0.0``, ``isclose(x, 0)`` is computed
as ``abs(x) ... | tolerance is ``1e-09``, which assures that the two values are the same within about 9 decimal digits. *rel_tol* must be nonnegative and less than ``1.0``.
*abs_tol* is the absolute tolerance; it defaults to ``0.0`` and it must be
nonnegative. When comparing ``x`` to ``0.0``, ``isclose(x, 0)`` is computed
as ``abs(x) ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ba1066bb-e9af-4c38-836e-a9bd525c180f | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,856 | supabase-export-v2 | c733198f59bb9cf4 | .. data:: tau
The mathematical constant *τ* = 6.283185..., to available precision. Tau is a circle constant equal to 2\ *π*, the ratio of a circle's circumference to
its radius. To learn more about Tau, check out Vi Hart's video `Pi is (still)
Wrong <https://vimeo.com/147792667>`_, and start celebrating
`Tau day <ht... | trusted_official_docs | CPython Docs | .. data:: tau
The mathematical constant *τ* = 6.283185..., to available precision. Tau is a circle constant equal to 2\ *π*, the ratio of a circle's circumference to
its radius. To learn more about Tau, check out Vi Hart's video `Pi is (still)
Wrong <https://vimeo.com/147792667>`_, and start celebrating
`Tau day <ht... | .. data:: tau
The mathematical constant *τ* = 6.283185..., to available precision. Tau is a circle constant equal to 2\ *π*, the ratio of a circle's circumference to
its radius. To learn more about Tau, check out Vi Hart's video `Pi is (still)
Wrong <https://vimeo.com/147792667>`_, and start celebrating
`Tau day <ht... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bcaf0086-f2b7-42c7-a7eb-09ed6582d4db | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,849 | supabase-export-v2 | 57df6e6a863b49a5 | .. versionchanged:: 3.9 Added support for an arbitrary number of arguments in the :func:`gcd` function. Formerly, only two arguments were supported.
.. versionchanged:: 3.10
Floats with integral values (like ``5.0``) are no longer accepted in the
:func:`factorial` function. | trusted_official_docs | CPython Docs | .. versionchanged:: 3.9 Added support for an arbitrary number of arguments in the :func:`gcd` function. Formerly, only two arguments were supported.
.. versionchanged:: 3.10
Floats with integral values (like ``5.0``) are no longer accepted in the
:func:`factorial` function. | .. versionchanged:: 3.9 Added support for an arbitrary number of arguments in the :func:`gcd` function. Formerly, only two arguments were supported.
.. versionchanged:: 3.10
Floats with integral values (like ``5.0``) are no longer accepted in the
:func:`factorial` function. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c93d6d6c-aae4-44f4-b54b-57e4ae7867fb | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,676 | supabase-export-v2 | 162efeb0ff00ca0a | .. function:: fmod(x, y)
Return the floating-point remainder of ``x / y``,
as defined by the platform C library function ``fmod(x, y)``. Note that the
Python expression ``x % y`` may not return the same result. The intent of the C
standard is that ``fmod(x, y)`` be exactly (mathematically; to infinite
precision) eq... | trusted_official_docs | CPython Docs | .. function:: fmod(x, y)
Return the floating-point remainder of ``x / y``,
as defined by the platform C library function ``fmod(x, y)``. Note that the
Python expression ``x % y`` may not return the same result. The intent of the C
standard is that ``fmod(x, y)`` be exactly (mathematically; to infinite
precision) eq... | .. function:: fmod(x, y)
Return the floating-point remainder of ``x / y``,
as defined by the platform C library function ``fmod(x, y)``. Note that the
Python expression ``x % y`` may not return the same result. The intent of the C
standard is that ``fmod(x, y)`` be exactly (mathematically; to infinite
precision) eq... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c9b457a4-2702-47dd-8e12-5d81adb371b7 | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,696 | supabase-export-v2 | 1f676d4bfaaeb77c | Return ``True`` if the values *a* and *b* are close to each other and ``False`` otherwise.
Whether or not two values are considered close is determined according to
given absolute and relative tolerances. If no errors occur, the result will
be: ``abs(a-b) <= max(rel_tol * max(abs(a), abs(b)), abs_tol)``. | trusted_official_docs | CPython Docs | Return ``True`` if the values *a* and *b* are close to each other and ``False`` otherwise.
Whether or not two values are considered close is determined according to
given absolute and relative tolerances. If no errors occur, the result will
be: ``abs(a-b) <= max(rel_tol * max(abs(a), abs(b)), abs_tol)``. | Return ``True`` if the values *a* and *b* are close to each other and ``False`` otherwise.
Whether or not two values are considered close is determined according to
given absolute and relative tolerances. If no errors occur, the result will
be: ``abs(a-b) <= max(rel_tol * max(abs(a), abs(b)), abs_tol)``. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
cb01adb2-e922-4ef6-a5b7-d19e43379175 | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,776 | supabase-export-v2 | b8f7a369d9d8145c | Calculate the product of all the elements in the input *iterable*. The default *start* value for the product is ``1``.
When the iterable is empty, return the start value. This function is
intended specifically for use with numeric values and may reject
non-numeric types. | trusted_official_docs | CPython Docs | Calculate the product of all the elements in the input *iterable*. The default *start* value for the product is ``1``.
When the iterable is empty, return the start value. This function is
intended specifically for use with numeric values and may reject
non-numeric types. | Calculate the product of all the elements in the input *iterable*. The default *start* value for the product is ``1``.
When the iterable is empty, return the start value. This function is
intended specifically for use with numeric values and may reject
non-numeric types. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d12a9816-3228-4798-ac6b-d5e520f4d11f | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,728 | supabase-export-v2 | 7ba2d89293a627c9 | positive finite number), return the value of the least significant bit of *x*, such that the first float bigger than *x* is ``x + ulp(x)``.
ULP stands for "Unit in the Last Place". | trusted_official_docs | CPython Docs | positive finite number), return the value of the least significant bit of *x*, such that the first float bigger than *x* is ``x + ulp(x)``.
ULP stands for "Unit in the Last Place". | positive finite number), return the value of the least significant bit of *x*, such that the first float bigger than *x* is ``x + ulp(x)``.
ULP stands for "Unit in the Last Place". | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d2203a00-56c0-465c-8c45-88ab2c462982 | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,655 | supabase-export-v2 | 9c09bb4960745127 | **Angular conversion** -------------------------------------------------------------------------------------------------- :func:`degrees(x) <degrees>` Convert angle *x* from radians to degrees :func:`radians(x) <radians>` Convert angle *x* from degrees to radians
**Trigonometric functions**
----------------------------... | trusted_official_docs | CPython Docs | **Angular conversion** -------------------------------------------------------------------------------------------------- :func:`degrees(x) <degrees>` Convert angle *x* from radians to degrees :func:`radians(x) <radians>` Convert angle *x* from degrees to radians
**Trigonometric functions**
----------------------------... | **Angular conversion** -------------------------------------------------------------------------------------------------- :func:`degrees(x) <degrees>` Convert angle *x* from radians to degrees :func:`radians(x) <radians>` Convert angle *x* from degrees to radians
**Trigonometric functions**
----------------------------... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d91246f6-9fa3-424c-8d4c-9913dcec64bb | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,739 | supabase-export-v2 | f8a74e8d958115ba | .. function:: expm1(x)
Return *e* raised to the power *x*, minus 1. Here *e* is the base of natural
logarithms. For small floats *x*, the subtraction in ``exp(x) - 1``
can result in a `significant loss of precision
<https://en.wikipedia.org/wiki/Loss_of_significance>`_\; the :func:`expm1`
function provides a way to... | trusted_official_docs | CPython Docs | .. function:: expm1(x)
Return *e* raised to the power *x*, minus 1. Here *e* is the base of natural
logarithms. For small floats *x*, the subtraction in ``exp(x) - 1``
can result in a `significant loss of precision
<https://en.wikipedia.org/wiki/Loss_of_significance>`_\; the :func:`expm1`
function provides a way to... | .. function:: expm1(x)
Return *e* raised to the power *x*, minus 1. Here *e* is the base of natural
logarithms. For small floats *x*, the subtraction in ``exp(x) - 1``
can result in a `significant loss of precision
<https://en.wikipedia.org/wiki/Loss_of_significance>`_\; the :func:`expm1`
function provides a way to... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e25aebc7-76f5-49fb-a58c-0cdfc2cbb5d3 | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,661 | supabase-export-v2 | bf926bce3875838c | .. function:: ceil(x)
Return the ceiling of *x*, the smallest integer greater than or equal to *x*. If *x* is not a float, delegates to :meth:`x.__ceil__ <object.__ceil__>`,
which should return an :class:`~numbers.Integral` value. | trusted_official_docs | CPython Docs | .. function:: ceil(x)
Return the ceiling of *x*, the smallest integer greater than or equal to *x*. If *x* is not a float, delegates to :meth:`x.__ceil__ <object.__ceil__>`,
which should return an :class:`~numbers.Integral` value. | .. function:: ceil(x)
Return the ceiling of *x*, the smallest integer greater than or equal to *x*. If *x* is not a float, delegates to :meth:`x.__ceil__ <object.__ceil__>`,
which should return an :class:`~numbers.Integral` value. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e388ef93-6d17-4dde-95fb-37547de6ef89 | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,727 | supabase-export-v2 | 9ef6c231bf7970d4 | Return the value of the least significant bit of the float *x*:
* If *x* is a NaN (not a number), return *x*. * If *x* is negative, return ``ulp(-x)``. * If *x* is a positive infinity, return *x*. * If *x* is equal to zero, return the smallest positive
*denormalized* representable float (smaller than the minimum posit... | trusted_official_docs | CPython Docs | Return the value of the least significant bit of the float *x*:
* If *x* is a NaN (not a number), return *x*. * If *x* is negative, return ``ulp(-x)``. * If *x* is a positive infinity, return *x*. * If *x* is equal to zero, return the smallest positive
*denormalized* representable float (smaller than the minimum posit... | Return the value of the least significant bit of the float *x*:
* If *x* is a NaN (not a number), return *x*. * If *x* is negative, return ``ulp(-x)``. * If *x* is a positive infinity, return *x*. * If *x* is equal to zero, return the smallest positive
*denormalized* representable float (smaller than the minimum posit... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e4cd157d-6872-4459-a876-5ea8debc7a6d | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,668 | supabase-export-v2 | 63f1da5f4edc6743 | range followed by a single round to the ``float`` format. This operation often provides better accuracy than the direct expression ``(x * y) + z``.
This function follows the specification of the fusedMultiplyAdd operation
described in the IEEE 754 standard. The standard leaves one case
implementation-defined, namely ... | trusted_official_docs | CPython Docs | range followed by a single round to the ``float`` format. This operation often provides better accuracy than the direct expression ``(x * y) + z``.
This function follows the specification of the fusedMultiplyAdd operation
described in the IEEE 754 standard. The standard leaves one case
implementation-defined, namely ... | range followed by a single round to the ``float`` format. This operation often provides better accuracy than the direct expression ``(x * y) + z``.
This function follows the specification of the fusedMultiplyAdd operation
described in the IEEE 754 standard. The standard leaves one case
implementation-defined, namely ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
efac2425-b63a-46bb-b366-ad36a94cef2e | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,860 | supabase-export-v2 | ebd2e92c57a458a0 | .. data:: nan
A floating-point "not a number" (NaN) value. Equivalent to the output of
``float('nan')``. Due to the requirements of the `IEEE-754 standard
<https://en.wikipedia.org/wiki/IEEE_754>`_, ``math.nan`` and ``float('nan')`` are
not considered to equal to any other numeric value, including themselves. To che... | trusted_official_docs | CPython Docs | .. data:: nan
A floating-point "not a number" (NaN) value. Equivalent to the output of
``float('nan')``. Due to the requirements of the `IEEE-754 standard
<https://en.wikipedia.org/wiki/IEEE_754>`_, ``math.nan`` and ``float('nan')`` are
not considered to equal to any other numeric value, including themselves. To che... | .. data:: nan
A floating-point "not a number" (NaN) value. Equivalent to the output of
``float('nan')``. Due to the requirements of the `IEEE-754 standard
<https://en.wikipedia.org/wiki/IEEE_754>`_, ``math.nan`` and ``float('nan')`` are
not considered to equal to any other numeric value, including themselves. To che... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f19a7acf-ef34-4550-87c9-30ac8c87e6ba | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,692 | supabase-export-v2 | 1ec74a612c436656 | .. function:: frexp(x)
Return the mantissa and exponent of *x* as the pair ``(m, e)``. *m* is a float
and *e* is an integer such that ``x == m * 2**e`` exactly. If *x* is zero,
returns ``(0.0, 0)``, otherwise ``0.5 <= abs(m) < 1``. This is used to "pick
apart" the internal representation of a float in a portable way... | trusted_official_docs | CPython Docs | .. function:: frexp(x)
Return the mantissa and exponent of *x* as the pair ``(m, e)``. *m* is a float
and *e* is an integer such that ``x == m * 2**e`` exactly. If *x* is zero,
returns ``(0.0, 0)``, otherwise ``0.5 <= abs(m) < 1``. This is used to "pick
apart" the internal representation of a float in a portable way... | .. function:: frexp(x)
Return the mantissa and exponent of *x* as the pair ``(m, e)``. *m* is a float
and *e* is an integer such that ``x == m * 2**e`` exactly. If *x* is zero,
returns ``(0.0, 0)``, otherwise ``0.5 <= abs(m) < 1``. This is used to "pick
apart" the internal representation of a float in a portable way... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f4124dea-313d-48f2-ae4d-30dbe6c952ae | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,657 | supabase-export-v2 | 2bb24020000f3138 | :func:`atanh(x) <atanh>` Inverse hyperbolic tangent of *x* :func:`cosh(x) <cosh>` Hyperbolic cosine of *x* :func:`sinh(x) <sinh>` Hyperbolic sine of *x* :func:`tanh(x) <tanh>` Hyperbolic tangent of *x*
**Special functions**
------------------------------------------------------------------------------------------------... | trusted_official_docs | CPython Docs | :func:`atanh(x) <atanh>` Inverse hyperbolic tangent of *x* :func:`cosh(x) <cosh>` Hyperbolic cosine of *x* :func:`sinh(x) <sinh>` Hyperbolic sine of *x* :func:`tanh(x) <tanh>` Hyperbolic tangent of *x*
**Special functions**
------------------------------------------------------------------------------------------------... | :func:`atanh(x) <atanh>` Inverse hyperbolic tangent of *x* :func:`cosh(x) <cosh>` Hyperbolic cosine of *x* :func:`sinh(x) <sinh>` Hyperbolic sine of *x* :func:`tanh(x) <tanh>` Hyperbolic tangent of *x*
**Special functions**
------------------------------------------------------------------------------------------------... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f4824fdb-69b8-46f6-a84d-933e1b321618 | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,656 | supabase-export-v2 | 48bd0ea02825da8a | Arc tangent of *x* :func:`atan2(y, x) <atan2>` ``atan(y / x)`` :func:`cos(x) <cos>` Cosine of *x* :func:`sin(x) <sin>` Sine of *x* :func:`tan(x) <tan>` Tangent of *x*
**Hyperbolic functions**
--------------------------------------------------------------------------------------------------
:func:`acosh(x) <acosh>` Inve... | trusted_official_docs | CPython Docs | Arc tangent of *x* :func:`atan2(y, x) <atan2>` ``atan(y / x)`` :func:`cos(x) <cos>` Cosine of *x* :func:`sin(x) <sin>` Sine of *x* :func:`tan(x) <tan>` Tangent of *x*
**Hyperbolic functions**
--------------------------------------------------------------------------------------------------
:func:`acosh(x) <acosh>` Inve... | Arc tangent of *x* :func:`atan2(y, x) <atan2>` ``atan(y / x)`` :func:`cos(x) <cos>` Cosine of *x* :func:`sin(x) <sin>` Sine of *x* :func:`tan(x) <tan>` Tangent of *x*
**Hyperbolic functions**
--------------------------------------------------------------------------------------------------
:func:`acosh(x) <acosh>` Inve... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f5bba4c5-10d9-4301-be13-091cc055bb46 | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,671 | supabase-export-v2 | fd1ddc72eda3c47f | Get the larger of two floating-point values, treating NaNs as missing data.
When both operands are (signed) NaNs or zeroes, return ``nan`` and ``0``
respectively and the sign of the result is implementation-defined, that
is, :func:`!fmax` is not required to be sensitive to the sign of such
operands (see Annex F of t... | trusted_official_docs | CPython Docs | Get the larger of two floating-point values, treating NaNs as missing data.
When both operands are (signed) NaNs or zeroes, return ``nan`` and ``0``
respectively and the sign of the result is implementation-defined, that
is, :func:`!fmax` is not required to be sensitive to the sign of such
operands (see Annex F of t... | Get the larger of two floating-point values, treating NaNs as missing data.
When both operands are (signed) NaNs or zeroes, return ``nan`` and ``0``
respectively and the sign of the result is implementation-defined, that
is, :func:`!fmax` is not required to be sensitive to the sign of such
operands (see Annex F of t... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ff6588c9-92ac-4bbe-b5f1-b87aa8ae50f9 | CPython Docs | file://datasets/cpython/Doc/library/math.rst | unknown | 61a06054-7004-4a74-b7ec-8ff66182924c | 29,651 | supabase-export-v2 | 8be41fd20bc269ff | y`` :func:`modf(x) <modf>` Fractional and integer parts of *x* :func:`remainder(x, y) <remainder>` Remainder of *x* with respect to *y* :func:`trunc(x) <trunc>` Integer part of *x*
**Floating point manipulation functions**
-------------------------------------------------------------------------------------------------... | trusted_official_docs | CPython Docs | y`` :func:`modf(x) <modf>` Fractional and integer parts of *x* :func:`remainder(x, y) <remainder>` Remainder of *x* with respect to *y* :func:`trunc(x) <trunc>` Integer part of *x*
**Floating point manipulation functions**
-------------------------------------------------------------------------------------------------... | y`` :func:`modf(x) <modf>` Fractional and integer parts of *x* :func:`remainder(x, y) <remainder>` Remainder of *x* with respect to *y* :func:`trunc(x) <trunc>` Integer part of *x*
**Floating point manipulation functions**
-------------------------------------------------------------------------------------------------... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2a97128a-a426-4bd9-99bc-ae91c40937e2 | CPython Docs | file://datasets/cpython/Doc/library/codeop.rst | unknown | d9369e9b-b1bf-4c86-b2eb-9bfeda76e18d | 29,885 | supabase-export-v2 | d910f3d3beae2070 | .. note::
It is possible (but not likely) that the parser stops parsing with a
successful outcome before reaching the end of the source; in this case,
trailing symbols may be ignored instead of causing an error. For example,
a backslash followed by two newlines may be followed by arbitrary garbage. This will be fixe... | trusted_official_docs | CPython Docs | .. note::
It is possible (but not likely) that the parser stops parsing with a
successful outcome before reaching the end of the source; in this case,
trailing symbols may be ignored instead of causing an error. For example,
a backslash followed by two newlines may be followed by arbitrary garbage. This will be fixe... | .. note::
It is possible (but not likely) that the parser stops parsing with a
successful outcome before reaching the end of the source; in this case,
trailing symbols may be ignored instead of causing an error. For example,
a backslash followed by two newlines may be followed by arbitrary garbage. This will be fixe... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3048cfb6-4666-46ad-9af5-211b255240e6 | CPython Docs | file://datasets/cpython/Doc/library/codeop.rst | unknown | d9369e9b-b1bf-4c86-b2eb-9bfeda76e18d | 29,883 | supabase-export-v2 | 8347b5cf963e822e | *source*, an exception will be raised. :exc:`SyntaxError` is raised if there is invalid Python syntax, and :exc:`OverflowError` or :exc:`ValueError` if there is an invalid literal.
The *symbol* argument determines whether *source* is compiled as a statement
(``'single'``, the default), as a sequence of :term:`statemen... | trusted_official_docs | CPython Docs | *source*, an exception will be raised. :exc:`SyntaxError` is raised if there is invalid Python syntax, and :exc:`OverflowError` or :exc:`ValueError` if there is an invalid literal.
The *symbol* argument determines whether *source* is compiled as a statement
(``'single'``, the default), as a sequence of :term:`statemen... | *source*, an exception will be raised. :exc:`SyntaxError` is raised if there is invalid Python syntax, and :exc:`OverflowError` or :exc:`ValueError` if there is an invalid literal.
The *symbol* argument determines whether *source* is compiled as a statement
(``'single'``, the default), as a sequence of :term:`statemen... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
6005cab9-516e-4c70-aa22-7036b9cbacb7 | CPython Docs | file://datasets/cpython/Doc/library/codeop.rst | unknown | d9369e9b-b1bf-4c86-b2eb-9bfeda76e18d | 29,876 | supabase-export-v2 | 50d4e3d73fe19b32 | There are two parts to this job:
#. Being able to tell if a line of input completes a Python statement: in
short, telling whether to print '``>>>``' or '``...``' next. | trusted_official_docs | CPython Docs | There are two parts to this job:
#. Being able to tell if a line of input completes a Python statement: in
short, telling whether to print '``>>>``' or '``...``' next. | There are two parts to this job:
#. Being able to tell if a line of input completes a Python statement: in
short, telling whether to print '``>>>``' or '``...``' next. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
89a9301d-6c40-40a6-ad88-70a806f502cc | CPython Docs | file://datasets/cpython/Doc/library/codeop.rst | unknown | d9369e9b-b1bf-4c86-b2eb-9bfeda76e18d | 29,878 | supabase-export-v2 | 23344b9a4e57e524 | #. Remembering which future statements the user has entered, so subsequent input can be compiled with these in effect.
The :mod:`!codeop` module provides a way of doing each of these things, and a way
of doing them both. | trusted_official_docs | CPython Docs | #. Remembering which future statements the user has entered, so subsequent input can be compiled with these in effect.
The :mod:`!codeop` module provides a way of doing each of these things, and a way
of doing them both. | #. Remembering which future statements the user has entered, so subsequent input can be compiled with these in effect.
The :mod:`!codeop` module provides a way of doing each of these things, and a way
of doing them both. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
92e7fccf-6edc-499d-af6c-4e71ed165ee5 | CPython Docs | file://datasets/cpython/Doc/library/codeop.rst | unknown | d9369e9b-b1bf-4c86-b2eb-9bfeda76e18d | 29,875 | supabase-export-v2 | 3b052eaf6f33c9ad | to use the module directly; if you want to include such a loop in your program you probably want to use the :mod:`code` module instead.
There are two parts to this job: | trusted_official_docs | CPython Docs | to use the module directly; if you want to include such a loop in your program you probably want to use the :mod:`code` module instead.
There are two parts to this job: | to use the module directly; if you want to include such a loop in your program you probably want to use the :mod:`code` module instead.
There are two parts to this job: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a8a16c20-035d-4c8d-b398-00dca088fdcc | CPython Docs | file://datasets/cpython/Doc/library/codeop.rst | unknown | d9369e9b-b1bf-4c86-b2eb-9bfeda76e18d | 29,881 | supabase-export-v2 | ff4a940319e8ef18 | .. function:: compile_command(source, filename="<input>", symbol="single")
Tries to compile *source*, which should be a string of Python code and return a
code object if *source* is valid Python code. In that case, the filename
attribute of the code object will be *filename*, which defaults to
``'<input>'``. Returns... | trusted_official_docs | CPython Docs | .. function:: compile_command(source, filename="<input>", symbol="single")
Tries to compile *source*, which should be a string of Python code and return a
code object if *source* is valid Python code. In that case, the filename
attribute of the code object will be *filename*, which defaults to
``'<input>'``. Returns... | .. function:: compile_command(source, filename="<input>", symbol="single")
Tries to compile *source*, which should be a string of Python code and return a
code object if *source* is valid Python code. In that case, the filename
attribute of the code object will be *filename*, which defaults to
``'<input>'``. Returns... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a9a4f1af-8933-4d7d-9a18-430124721004 | CPython Docs | file://datasets/cpython/Doc/library/codeop.rst | unknown | d9369e9b-b1bf-4c86-b2eb-9bfeda76e18d | 29,874 | supabase-export-v2 | dc66a715398c8a67 | --------------
The :mod:`!codeop` module provides utilities upon which the Python
read-eval-print loop can be emulated, as is done in the :mod:`code` module. As
a result, you probably don't want to use the module directly; if you want to
include such a loop in your program you probably want to use the :mod:`code`
modul... | trusted_official_docs | CPython Docs | --------------
The :mod:`!codeop` module provides utilities upon which the Python
read-eval-print loop can be emulated, as is done in the :mod:`code` module. As
a result, you probably don't want to use the module directly; if you want to
include such a loop in your program you probably want to use the :mod:`code`
modul... | --------------
The :mod:`!codeop` module provides utilities upon which the Python
read-eval-print loop can be emulated, as is done in the :mod:`code` module. As
a result, you probably don't want to use the module directly; if you want to
include such a loop in your program you probably want to use the :mod:`code`
modul... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bf563c02-fa79-4132-8ab0-d8e2aff3da1f | CPython Docs | file://datasets/cpython/Doc/library/codeop.rst | unknown | d9369e9b-b1bf-4c86-b2eb-9bfeda76e18d | 29,882 | supabase-export-v2 | 58f6d2087f9c584f | object will be *filename*, which defaults to ``'<input>'``. Returns ``None`` if *source* is *not* valid Python code, but is a prefix of valid Python code.
If there is a problem with *source*, an exception will be raised. :exc:`SyntaxError` is raised if there is invalid Python syntax, and
:exc:`OverflowError` or :exc:`... | trusted_official_docs | CPython Docs | object will be *filename*, which defaults to ``'<input>'``. Returns ``None`` if *source* is *not* valid Python code, but is a prefix of valid Python code.
If there is a problem with *source*, an exception will be raised. :exc:`SyntaxError` is raised if there is invalid Python syntax, and
:exc:`OverflowError` or :exc:`... | object will be *filename*, which defaults to ``'<input>'``. Returns ``None`` if *source* is *not* valid Python code, but is a prefix of valid Python code.
If there is a problem with *source*, an exception will be raised. :exc:`SyntaxError` is raised if there is invalid Python syntax, and
:exc:`OverflowError` or :exc:`... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e108e0fb-781a-4697-81f0-a1db1088f352 | CPython Docs | file://datasets/cpython/Doc/library/codeop.rst | unknown | d9369e9b-b1bf-4c86-b2eb-9bfeda76e18d | 29,889 | supabase-export-v2 | 8838c76cf1758ca0 | .. class:: CommandCompiler()
Instances of this class have :meth:`~object.__call__` methods identical in signature to
:func:`compile_command`; the difference is that if the instance compiles program
text containing a :mod:`__future__` statement, the instance 'remembers' and
compiles all subsequent program texts with ... | trusted_official_docs | CPython Docs | .. class:: CommandCompiler()
Instances of this class have :meth:`~object.__call__` methods identical in signature to
:func:`compile_command`; the difference is that if the instance compiles program
text containing a :mod:`__future__` statement, the instance 'remembers' and
compiles all subsequent program texts with ... | .. class:: CommandCompiler()
Instances of this class have :meth:`~object.__call__` methods identical in signature to
:func:`compile_command`; the difference is that if the instance compiles program
text containing a :mod:`__future__` statement, the instance 'remembers' and
compiles all subsequent program texts with ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
eae0d2e2-14d4-4c51-8271-31cd15c96e81 | CPython Docs | file://datasets/cpython/Doc/library/codeop.rst | unknown | d9369e9b-b1bf-4c86-b2eb-9bfeda76e18d | 29,887 | supabase-export-v2 | 865884f5ef917ec2 | .. class:: Compile()
Instances of this class have :meth:`~object.__call__` methods identical in signature to
the built-in function :func:`compile`, but with the difference that if the
instance compiles program text containing a :mod:`__future__` statement, the
instance 'remembers' and compiles all subsequent program... | trusted_official_docs | CPython Docs | .. class:: Compile()
Instances of this class have :meth:`~object.__call__` methods identical in signature to
the built-in function :func:`compile`, but with the difference that if the
instance compiles program text containing a :mod:`__future__` statement, the
instance 'remembers' and compiles all subsequent program... | .. class:: Compile()
Instances of this class have :meth:`~object.__call__` methods identical in signature to
the built-in function :func:`compile`, but with the difference that if the
instance compiles program text containing a :mod:`__future__` statement, the
instance 'remembers' and compiles all subsequent program... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ec30f81d-8d31-4ee5-b9cf-596fb8944f18 | CPython Docs | file://datasets/cpython/Doc/library/codeop.rst | unknown | d9369e9b-b1bf-4c86-b2eb-9bfeda76e18d | 29,877 | supabase-export-v2 | b963d33ae8bfc0d6 | #. Being able to tell if a line of input completes a Python statement: in short, telling whether to print '``>>>``' or '``...``' next.
#. Remembering which future statements the user has entered, so subsequent
input can be compiled with these in effect. | trusted_official_docs | CPython Docs | #. Being able to tell if a line of input completes a Python statement: in short, telling whether to print '``>>>``' or '``...``' next.
#. Remembering which future statements the user has entered, so subsequent
input can be compiled with these in effect. | #. Being able to tell if a line of input completes a Python statement: in short, telling whether to print '``>>>``' or '``...``' next.
#. Remembering which future statements the user has entered, so subsequent
input can be compiled with these in effect. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
039cfb3d-ab43-40a4-adea-9f912376a25c | CPython Docs | file://datasets/cpython/Doc/library/email.utils.rst | unknown | 04cae1ce-9a25-42b8-81e8-3c087b322e62 | 29,936 | supabase-export-v2 | 5d2342b50f7d60d9 | a date relative to the local timezone instead of UTC, properly taking daylight savings time into account. The default is ``False`` meaning UTC is used.
Optional *usegmt* is a flag that when ``True``, outputs a date string with the
timezone as an ascii string ``GMT``, rather than a numeric ``-0000``. This is
needed fo... | trusted_official_docs | CPython Docs | a date relative to the local timezone instead of UTC, properly taking daylight savings time into account. The default is ``False`` meaning UTC is used.
Optional *usegmt* is a flag that when ``True``, outputs a date string with the
timezone as an ascii string ``GMT``, rather than a numeric ``-0000``. This is
needed fo... | a date relative to the local timezone instead of UTC, properly taking daylight savings time into account. The default is ``False`` meaning UTC is used.
Optional *usegmt* is a flag that when ``True``, outputs a date string with the
timezone as an ascii string ``GMT``, rather than a numeric ``-0000``. This is
needed fo... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0fae2129-0682-4e39-b2d2-2e98287c81fd | CPython Docs | file://datasets/cpython/Doc/library/email.utils.rst | unknown | 04cae1ce-9a25-42b8-81e8-3c087b322e62 | 29,902 | supabase-export-v2 | cfd427bdb6965040 | .. versionchanged:: 3.2 Added the *domain* keyword.
The remaining functions are part of the legacy (``Compat32``) email API. There
is no need to directly use these with the new API, since the parsing and
formatting they provide is done automatically by the header parsing machinery
of the new API. | trusted_official_docs | CPython Docs | .. versionchanged:: 3.2 Added the *domain* keyword.
The remaining functions are part of the legacy (``Compat32``) email API. There
is no need to directly use these with the new API, since the parsing and
formatting they provide is done automatically by the header parsing machinery
of the new API. | .. versionchanged:: 3.2 Added the *domain* keyword.
The remaining functions are part of the legacy (``Compat32``) email API. There
is no need to directly use these with the new API, since the parsing and
formatting they provide is done automatically by the header parsing machinery
of the new API. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
13774e1c-f915-4ce8-9cd0-2decd5bd05db | CPython Docs | file://datasets/cpython/Doc/library/email.utils.rst | unknown | 04cae1ce-9a25-42b8-81e8-3c087b322e62 | 29,912 | supabase-export-v2 | 04d807c88028330c | .. function:: formataddr(pair, charset='utf-8')
The inverse of :meth:`parseaddr`, this takes a 2-tuple of the form ``(realname,
email_address)`` and returns the string value suitable for a :mailheader:`To` or
:mailheader:`Cc` header. If the first element of *pair* is false, then the
second element is returned unmodi... | trusted_official_docs | CPython Docs | .. function:: formataddr(pair, charset='utf-8')
The inverse of :meth:`parseaddr`, this takes a 2-tuple of the form ``(realname,
email_address)`` and returns the string value suitable for a :mailheader:`To` or
:mailheader:`Cc` header. If the first element of *pair* is false, then the
second element is returned unmodi... | .. function:: formataddr(pair, charset='utf-8')
The inverse of :meth:`parseaddr`, this takes a 2-tuple of the form ``(realname,
email_address)`` and returns the string value suitable for a :mailheader:`To` or
:mailheader:`Cc` header. If the first element of *pair* is false, then the
second element is returned unmodi... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
14110b2d-b316-4cfa-831e-18b5028e7a85 | CPython Docs | file://datasets/cpython/Doc/library/email.utils.rst | unknown | 04cae1ce-9a25-42b8-81e8-3c087b322e62 | 29,925 | supabase-export-v2 | 68bc491ac2d244ca | .. function:: parsedate_tz(date)
Performs the same function as :func:`parsedate`, but returns either ``None`` or
a 10-tuple; the first 9 elements make up a tuple that can be passed directly to
:func:`time.mktime`, and the tenth is the offset of the date's timezone from UTC
(which is the official term for Greenwich M... | trusted_official_docs | CPython Docs | .. function:: parsedate_tz(date)
Performs the same function as :func:`parsedate`, but returns either ``None`` or
a 10-tuple; the first 9 elements make up a tuple that can be passed directly to
:func:`time.mktime`, and the tenth is the offset of the date's timezone from UTC
(which is the official term for Greenwich M... | .. function:: parsedate_tz(date)
Performs the same function as :func:`parsedate`, but returns either ``None`` or
a 10-tuple; the first 9 elements make up a tuple that can be passed directly to
:func:`time.mktime`, and the tenth is the offset of the date's timezone from UTC
(which is the official term for Greenwich M... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
195e890f-eeb2-4514-af7b-387171ed061a | CPython Docs | file://datasets/cpython/Doc/library/email.utils.rst | unknown | 04cae1ce-9a25-42b8-81e8-3c087b322e62 | 29,906 | supabase-export-v2 | 9a7650c99f951855 | .. function:: unquote(str)
Return a new string which is an *unquoted* version of *str*. If *str* ends and
begins with double quotes, they are stripped off. Likewise if *str* ends and
begins with angle brackets, they are stripped off. | trusted_official_docs | CPython Docs | .. function:: unquote(str)
Return a new string which is an *unquoted* version of *str*. If *str* ends and
begins with double quotes, they are stripped off. Likewise if *str* ends and
begins with angle brackets, they are stripped off. | .. function:: unquote(str)
Return a new string which is an *unquoted* version of *str*. If *str* ends and
begins with double quotes, they are stripped off. Likewise if *str* ends and
begins with angle brackets, they are stripped off. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1def109d-72a9-4d56-96ec-bc3bd99c2d0c | CPython Docs | file://datasets/cpython/Doc/library/email.utils.rst | unknown | 04cae1ce-9a25-42b8-81e8-3c087b322e62 | 29,908 | supabase-export-v2 | 64bae2cf59ee3e92 | .. function:: parseaddr(address, *, strict=True)
Parse address -- which should be the value of some address-containing field such
as :mailheader:`To` or :mailheader:`Cc` -- into its constituent *realname* and
*email address* parts. Returns a tuple of that information, unless the parse
fails, in which case a 2-tuple ... | trusted_official_docs | CPython Docs | .. function:: parseaddr(address, *, strict=True)
Parse address -- which should be the value of some address-containing field such
as :mailheader:`To` or :mailheader:`Cc` -- into its constituent *realname* and
*email address* parts. Returns a tuple of that information, unless the parse
fails, in which case a 2-tuple ... | .. function:: parseaddr(address, *, strict=True)
Parse address -- which should be the value of some address-containing field such
as :mailheader:`To` or :mailheader:`Cc` -- into its constituent *realname* and
*email address* parts. Returns a tuple of that information, unless the parse
fails, in which case a 2-tuple ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2462edf8-86ce-4d5f-8d3e-0af7dfc18e30 | CPython Docs | file://datasets/cpython/Doc/library/email.utils.rst | unknown | 04cae1ce-9a25-42b8-81e8-3c087b322e62 | 29,917 | supabase-export-v2 | 9d92d32623ea5a46 | a list of 2-tuples of the form returned by ``parseaddr()``. *fieldvalues* is a sequence of header field values as might be returned by :meth:`Message.get_all <email.message.Message.get_all>`.
If *strict* is true, use a strict parser which rejects malformed inputs. | trusted_official_docs | CPython Docs | a list of 2-tuples of the form returned by ``parseaddr()``. *fieldvalues* is a sequence of header field values as might be returned by :meth:`Message.get_all <email.message.Message.get_all>`.
If *strict* is true, use a strict parser which rejects malformed inputs. | a list of 2-tuples of the form returned by ``parseaddr()``. *fieldvalues* is a sequence of header field values as might be returned by :meth:`Message.get_all <email.message.Message.get_all>`.
If *strict* is true, use a strict parser which rejects malformed inputs. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2b6330ff-8824-43cf-9a64-cc596db2b2e5 | CPython Docs | file://datasets/cpython/Doc/library/email.utils.rst | unknown | 04cae1ce-9a25-42b8-81e8-3c087b322e62 | 29,909 | supabase-export-v2 | 15852ab7506bd5c2 | *realname* and *email address* parts. Returns a tuple of that information, unless the parse fails, in which case a 2-tuple of ``('', '')`` is returned.
If *strict* is true, use a strict parser which rejects malformed inputs. | trusted_official_docs | CPython Docs | *realname* and *email address* parts. Returns a tuple of that information, unless the parse fails, in which case a 2-tuple of ``('', '')`` is returned.
If *strict* is true, use a strict parser which rejects malformed inputs. | *realname* and *email address* parts. Returns a tuple of that information, unless the parse fails, in which case a 2-tuple of ``('', '')`` is returned.
If *strict* is true, use a strict parser which rejects malformed inputs. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
31c4b655-c688-42f1-9a20-81d353a24182 | CPython Docs | file://datasets/cpython/Doc/library/email.utils.rst | unknown | 04cae1ce-9a25-42b8-81e8-3c087b322e62 | 29,896 | supabase-export-v2 | 93b64a764950504f | .. function:: localtime(dt=None)
Return local time as an aware datetime object. If called without
arguments, return current time. Otherwise *dt* argument should be a
:class:`~datetime.datetime` instance, and it is converted to the local time
zone according to the system time zone database. If *dt* is naive (that
is... | trusted_official_docs | CPython Docs | .. function:: localtime(dt=None)
Return local time as an aware datetime object. If called without
arguments, return current time. Otherwise *dt* argument should be a
:class:`~datetime.datetime` instance, and it is converted to the local time
zone according to the system time zone database. If *dt* is naive (that
is... | .. function:: localtime(dt=None)
Return local time as an aware datetime object. If called without
arguments, return current time. Otherwise *dt* argument should be a
:class:`~datetime.datetime` instance, and it is converted to the local time
zone according to the system time zone database. If *dt* is naive (that
is... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3451ae0c-1e87-4c61-994e-9e01a756bd42 | CPython Docs | file://datasets/cpython/Doc/library/email.utils.rst | unknown | 04cae1ce-9a25-42b8-81e8-3c087b322e62 | 29,930 | supabase-export-v2 | bb8af164cc181297 | .. function:: mktime_tz(tuple)
Turn a 10-tuple as returned by :func:`parsedate_tz` into a UTC
timestamp (seconds since the Epoch). If the timezone item in the
tuple is ``None``, assume local time. | trusted_official_docs | CPython Docs | .. function:: mktime_tz(tuple)
Turn a 10-tuple as returned by :func:`parsedate_tz` into a UTC
timestamp (seconds since the Epoch). If the timezone item in the
tuple is ``None``, assume local time. | .. function:: mktime_tz(tuple)
Turn a 10-tuple as returned by :func:`parsedate_tz` into a UTC
timestamp (seconds since the Epoch). If the timezone item in the
tuple is ``None``, assume local time. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
395327cb-3132-43e0-853f-f284e22af395 | CPython Docs | file://datasets/cpython/Doc/library/email.utils.rst | unknown | 04cae1ce-9a25-42b8-81e8-3c087b322e62 | 29,935 | supabase-export-v2 | 2d6e5d2a59754a9f | Optional *timeval* if given is a floating-point time value as accepted by :func:`time.gmtime` and :func:`time.localtime`, otherwise the current time is used.
Optional *localtime* is a flag that when ``True``, interprets *timeval*, and
returns a date relative to the local timezone instead of UTC, properly taking
dayli... | trusted_official_docs | CPython Docs | Optional *timeval* if given is a floating-point time value as accepted by :func:`time.gmtime` and :func:`time.localtime`, otherwise the current time is used.
Optional *localtime* is a flag that when ``True``, interprets *timeval*, and
returns a date relative to the local timezone instead of UTC, properly taking
dayli... | Optional *timeval* if given is a floating-point time value as accepted by :func:`time.gmtime` and :func:`time.localtime`, otherwise the current time is used.
Optional *localtime* is a flag that when ``True``, interprets *timeval*, and
returns a date relative to the local timezone instead of UTC, properly taking
dayli... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3c81e81c-971d-4c88-91d2-76c12ff037e3 | CPython Docs | file://datasets/cpython/Doc/library/email.utils.rst | unknown | 04cae1ce-9a25-42b8-81e8-3c087b322e62 | 29,914 | supabase-export-v2 | 0681f01603497ca0 | in the :rfc:`2047` encoding of the ``realname`` if the ``realname`` contains non-ASCII characters. Can be an instance of :class:`str` or a :class:`~email.charset.Charset`. Defaults to ``utf-8``.
.. versionchanged:: 3.3
Added the *charset* option. | trusted_official_docs | CPython Docs | in the :rfc:`2047` encoding of the ``realname`` if the ``realname`` contains non-ASCII characters. Can be an instance of :class:`str` or a :class:`~email.charset.Charset`. Defaults to ``utf-8``.
.. versionchanged:: 3.3
Added the *charset* option. | in the :rfc:`2047` encoding of the ``realname`` if the ``realname`` contains non-ASCII characters. Can be an instance of :class:`str` or a :class:`~email.charset.Charset`. Defaults to ``utf-8``.
.. versionchanged:: 3.3
Added the *charset* option. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
58fb530d-cb09-4b1d-b388-49fa7bacb8a6 | CPython Docs | file://datasets/cpython/Doc/library/email.utils.rst | unknown | 04cae1ce-9a25-42b8-81e8-3c087b322e62 | 29,943 | supabase-export-v2 | a54f6783c8636053 | .. function:: encode_rfc2231(s, charset=None, language=None)
Encode the string *s* according to :rfc:`2231`. Optional *charset* and
*language*, if given is the character set name and language name to use. If
neither is given, *s* is returned as-is. If *charset* is given but *language*
is not, the string is encoded u... | trusted_official_docs | CPython Docs | .. function:: encode_rfc2231(s, charset=None, language=None)
Encode the string *s* according to :rfc:`2231`. Optional *charset* and
*language*, if given is the character set name and language name to use. If
neither is given, *s* is returned as-is. If *charset* is given but *language*
is not, the string is encoded u... | .. function:: encode_rfc2231(s, charset=None, language=None)
Encode the string *s* according to :rfc:`2231`. Optional *charset* and
*language*, if given is the character set name and language name to use. If
neither is given, *s* is returned as-is. If *charset* is given but *language*
is not, the string is encoded u... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
71bb49fd-afef-46ff-8899-772134a247e4 | CPython Docs | file://datasets/cpython/Doc/library/email.utils.rst | unknown | 04cae1ce-9a25-42b8-81e8-3c087b322e62 | 29,950 | supabase-export-v2 | 90a6c3b7e886d639 | .. rubric:: Footnotes
.. [#] Note that the sign of the timezone offset is the opposite of the sign of the
``time.timezone`` variable for the same timezone; the latter variable follows
the POSIX standard while this module follows :rfc:`2822`. | trusted_official_docs | CPython Docs | .. rubric:: Footnotes
.. [#] Note that the sign of the timezone offset is the opposite of the sign of the
``time.timezone`` variable for the same timezone; the latter variable follows
the POSIX standard while this module follows :rfc:`2822`. | .. rubric:: Footnotes
.. [#] Note that the sign of the timezone offset is the opposite of the sign of the
``time.timezone`` variable for the same timezone; the latter variable follows
the POSIX standard while this module follows :rfc:`2822`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7ef992fc-b2ab-47d5-b74c-eed79f5fe0d0 | CPython Docs | file://datasets/cpython/Doc/library/email.utils.rst | unknown | 04cae1ce-9a25-42b8-81e8-3c087b322e62 | 29,944 | supabase-export-v2 | 26c593e35b0321fb | neither is given, *s* is returned as-is. If *charset* is given but *language* is not, the string is encoded using the empty string for *language*.
.. function:: collapse_rfc2231_value(value, errors='replace', fallback_charset='us-ascii') | trusted_official_docs | CPython Docs | neither is given, *s* is returned as-is. If *charset* is given but *language* is not, the string is encoded using the empty string for *language*.
.. function:: collapse_rfc2231_value(value, errors='replace', fallback_charset='us-ascii') | neither is given, *s* is returned as-is. If *charset* is given but *language* is not, the string is encoded using the empty string for *language*.
.. function:: collapse_rfc2231_value(value, errors='replace', fallback_charset='us-ascii') | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
80e2837b-7761-4653-a7fd-e0a3bf3d8400 | CPython Docs | file://datasets/cpython/Doc/library/email.utils.rst | unknown | 04cae1ce-9a25-42b8-81e8-3c087b322e62 | 29,923 | supabase-export-v2 | af21faa0b45777b2 | .. function:: parsedate(date)
Attempts to parse a date according to the rules in :rfc:`2822`. however, some
mailers don't follow that format as specified, so :func:`parsedate` tries to
guess correctly in such cases. *date* is a string containing an :rfc:`2822`
date, such as ``"Mon, 20 Nov 1995 19:12:08 -0500"``. If ... | trusted_official_docs | CPython Docs | .. function:: parsedate(date)
Attempts to parse a date according to the rules in :rfc:`2822`. however, some
mailers don't follow that format as specified, so :func:`parsedate` tries to
guess correctly in such cases. *date* is a string containing an :rfc:`2822`
date, such as ``"Mon, 20 Nov 1995 19:12:08 -0500"``. If ... | .. function:: parsedate(date)
Attempts to parse a date according to the rules in :rfc:`2822`. however, some
mailers don't follow that format as specified, so :func:`parsedate` tries to
guess correctly in such cases. *date* is a string containing an :rfc:`2822`
date, such as ``"Mon, 20 Nov 1995 19:12:08 -0500"``. If ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8cd54a34-84ab-4be1-b042-239632935506 | CPython Docs | file://datasets/cpython/Doc/library/email.utils.rst | unknown | 04cae1ce-9a25-42b8-81e8-3c087b322e62 | 29,938 | supabase-export-v2 | 9d03d66c150adf1f | .. function:: format_datetime(dt, usegmt=False)
Like ``formatdate``, but the input is a :mod:`datetime` instance. If it is
a naive datetime, it is assumed to be "UTC with no information about the
source timezone", and the conventional ``-0000`` is used for the timezone. If it is an aware ``datetime``, then the numeri... | trusted_official_docs | CPython Docs | .. function:: format_datetime(dt, usegmt=False)
Like ``formatdate``, but the input is a :mod:`datetime` instance. If it is
a naive datetime, it is assumed to be "UTC with no information about the
source timezone", and the conventional ``-0000`` is used for the timezone. If it is an aware ``datetime``, then the numeri... | .. function:: format_datetime(dt, usegmt=False)
Like ``formatdate``, but the input is a :mod:`datetime` instance. If it is
a naive datetime, it is assumed to be "UTC with no information about the
source timezone", and the conventional ``-0000`` is used for the timezone. If it is an aware ``datetime``, then the numeri... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9800e078-7902-404b-b88d-129ba7420b48 | CPython Docs | file://datasets/cpython/Doc/library/email.utils.rst | unknown | 04cae1ce-9a25-42b8-81e8-3c087b322e62 | 29,900 | supabase-export-v2 | cfab7dd98cc667ef | .. function:: make_msgid(idstring=None, domain=None)
Returns a string suitable for an :rfc:`2822`\ -compliant
:mailheader:`Message-ID` header. Optional *idstring* if given, is a string
used to strengthen the uniqueness of the message id. Optional *domain* if
given provides the portion of the msgid after the '@'. The... | trusted_official_docs | CPython Docs | .. function:: make_msgid(idstring=None, domain=None)
Returns a string suitable for an :rfc:`2822`\ -compliant
:mailheader:`Message-ID` header. Optional *idstring* if given, is a string
used to strengthen the uniqueness of the message id. Optional *domain* if
given provides the portion of the msgid after the '@'. The... | .. function:: make_msgid(idstring=None, domain=None)
Returns a string suitable for an :rfc:`2822`\ -compliant
:mailheader:`Message-ID` header. Optional *idstring* if given, is a string
used to strengthen the uniqueness of the message id. Optional *domain* if
given provides the portion of the msgid after the '@'. The... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b39f3b0d-0961-43b6-95ca-796a05fb9187 | CPython Docs | file://datasets/cpython/Doc/library/email.utils.rst | unknown | 04cae1ce-9a25-42b8-81e8-3c087b322e62 | 29,945 | supabase-export-v2 | dee3695016a2cc75 | .. function:: collapse_rfc2231_value(value, errors='replace', fallback_charset='us-ascii')
When a header parameter is encoded in :rfc:`2231` format,
:meth:`Message.get_param <email.message.Message.get_param>` may return a
3-tuple containing the character set,
language, and value. :func:`collapse_rfc2231_value` turns... | trusted_official_docs | CPython Docs | .. function:: collapse_rfc2231_value(value, errors='replace', fallback_charset='us-ascii')
When a header parameter is encoded in :rfc:`2231` format,
:meth:`Message.get_param <email.message.Message.get_param>` may return a
3-tuple containing the character set,
language, and value. :func:`collapse_rfc2231_value` turns... | .. function:: collapse_rfc2231_value(value, errors='replace', fallback_charset='us-ascii')
When a header parameter is encoded in :rfc:`2231` format,
:meth:`Message.get_param <email.message.Message.get_param>` may return a
3-tuple containing the character set,
language, and value. :func:`collapse_rfc2231_value` turns... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bf109f74-4f69-4a6b-9ece-c9e9dde1b4b0 | CPython Docs | file://datasets/cpython/Doc/library/email.utils.rst | unknown | 04cae1ce-9a25-42b8-81e8-3c087b322e62 | 29,946 | supabase-export-v2 | 2f88cd98969bd876 | ``'replace'``. Optional *fallback_charset* specifies the character set to use if the one in the :rfc:`2231` header is not known by Python; it defaults to ``'us-ascii'``.
For convenience, if the *value* passed to :func:`collapse_rfc2231_value` is not
a tuple, it should be a string and it is returned unquoted. | trusted_official_docs | CPython Docs | ``'replace'``. Optional *fallback_charset* specifies the character set to use if the one in the :rfc:`2231` header is not known by Python; it defaults to ``'us-ascii'``.
For convenience, if the *value* passed to :func:`collapse_rfc2231_value` is not
a tuple, it should be a string and it is returned unquoted. | ``'replace'``. Optional *fallback_charset* specifies the character set to use if the one in the :rfc:`2231` header is not known by Python; it defaults to ``'us-ascii'``.
For convenience, if the *value* passed to :func:`collapse_rfc2231_value` is not
a tuple, it should be a string and it is returned unquoted. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c68800f2-0fbe-4e04-86fa-1309ceb9840d | CPython Docs | file://datasets/cpython/Doc/library/email.utils.rst | unknown | 04cae1ce-9a25-42b8-81e8-3c087b322e62 | 29,916 | supabase-export-v2 | 7916d5b798823260 | .. function:: getaddresses(fieldvalues, *, strict=True)
This method returns a list of 2-tuples of the form returned by ``parseaddr()``. *fieldvalues* is a sequence of header field values as might be returned by
:meth:`Message.get_all <email.message.Message.get_all>`. | trusted_official_docs | CPython Docs | .. function:: getaddresses(fieldvalues, *, strict=True)
This method returns a list of 2-tuples of the form returned by ``parseaddr()``. *fieldvalues* is a sequence of header field values as might be returned by
:meth:`Message.get_all <email.message.Message.get_all>`. | .. function:: getaddresses(fieldvalues, *, strict=True)
This method returns a list of 2-tuples of the form returned by ``parseaddr()``. *fieldvalues* is a sequence of header field values as might be returned by
:meth:`Message.get_all <email.message.Message.get_all>`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c96aac13-12d0-4564-8fff-0e4f314cafee | CPython Docs | file://datasets/cpython/Doc/library/email.utils.rst | unknown | 04cae1ce-9a25-42b8-81e8-3c087b322e62 | 29,921 | supabase-export-v2 | 90286a5326290ab3 | tos = msg.get_all('to', []) ccs = msg.get_all('cc', []) resent_tos = msg.get_all('resent-to', []) resent_ccs = msg.get_all('resent-cc', []) all_recipients = getaddresses(tos + ccs + resent_tos + resent_ccs)
.. versionchanged:: 3.13
Add *strict* optional parameter and reject malformed inputs by default. | trusted_official_docs | CPython Docs | tos = msg.get_all('to', []) ccs = msg.get_all('cc', []) resent_tos = msg.get_all('resent-to', []) resent_ccs = msg.get_all('resent-cc', []) all_recipients = getaddresses(tos + ccs + resent_tos + resent_ccs)
.. versionchanged:: 3.13
Add *strict* optional parameter and reject malformed inputs by default. | tos = msg.get_all('to', []) ccs = msg.get_all('cc', []) resent_tos = msg.get_all('resent-to', []) resent_ccs = msg.get_all('resent-cc', []) all_recipients = getaddresses(tos + ccs + resent_tos + resent_ccs)
.. versionchanged:: 3.13
Add *strict* optional parameter and reject malformed inputs by default. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d4636137-496f-4a85-b756-84f29585f9a2 | CPython Docs | file://datasets/cpython/Doc/library/email.utils.rst | unknown | 04cae1ce-9a25-42b8-81e8-3c087b322e62 | 29,927 | supabase-export-v2 | 550c003ade2b47bb | .. function:: parsedate_to_datetime(date)
The inverse of :func:`format_datetime`. Performs the same function as
:func:`parsedate`, but on success returns a :mod:`~datetime.datetime`;
otherwise ``ValueError`` is raised if *date* contains an invalid value such
as an hour greater than 23 or a timezone offset not betwee... | trusted_official_docs | CPython Docs | .. function:: parsedate_to_datetime(date)
The inverse of :func:`format_datetime`. Performs the same function as
:func:`parsedate`, but on success returns a :mod:`~datetime.datetime`;
otherwise ``ValueError`` is raised if *date* contains an invalid value such
as an hour greater than 23 or a timezone offset not betwee... | .. function:: parsedate_to_datetime(date)
The inverse of :func:`format_datetime`. Performs the same function as
:func:`parsedate`, but on success returns a :mod:`~datetime.datetime`;
otherwise ``ValueError`` is raised if *date* contains an invalid value such
as an hour greater than 23 or a timezone offset not betwee... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f12559fa-5b34-4563-973b-d7fbc1abf072 | CPython Docs | file://datasets/cpython/Doc/library/email.utils.rst | unknown | 04cae1ce-9a25-42b8-81e8-3c087b322e62 | 29,913 | supabase-export-v2 | 5e41b6c3745a9b2c | the string value suitable for a :mailheader:`To` or :mailheader:`Cc` header. If the first element of *pair* is false, then the second element is returned unmodified.
Optional *charset* is the character set that will be used in the :rfc:`2047`
encoding of the ``realname`` if the ``realname`` contains non-ASCII
charact... | trusted_official_docs | CPython Docs | the string value suitable for a :mailheader:`To` or :mailheader:`Cc` header. If the first element of *pair* is false, then the second element is returned unmodified.
Optional *charset* is the character set that will be used in the :rfc:`2047`
encoding of the ``realname`` if the ``realname`` contains non-ASCII
charact... | the string value suitable for a :mailheader:`To` or :mailheader:`Cc` header. If the first element of *pair* is false, then the second element is returned unmodified.
Optional *charset* is the character set that will be used in the :rfc:`2047`
encoding of the ``realname`` if the ``realname`` contains non-ASCII
charact... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f2e6b4aa-e33f-42b6-bd1f-58bcb4246a53 | CPython Docs | file://datasets/cpython/Doc/library/email.utils.rst | unknown | 04cae1ce-9a25-42b8-81e8-3c087b322e62 | 29,931 | supabase-export-v2 | a2856a7a4524e312 | 10-tuple as returned by :func:`parsedate_tz` into a UTC timestamp (seconds since the Epoch). If the timezone item in the tuple is ``None``, assume local time.
.. function:: formatdate(timeval=None, localtime=False, usegmt=False) | trusted_official_docs | CPython Docs | 10-tuple as returned by :func:`parsedate_tz` into a UTC timestamp (seconds since the Epoch). If the timezone item in the tuple is ``None``, assume local time.
.. function:: formatdate(timeval=None, localtime=False, usegmt=False) | 10-tuple as returned by :func:`parsedate_tz` into a UTC timestamp (seconds since the Epoch). If the timezone item in the tuple is ``None``, assume local time.
.. function:: formatdate(timeval=None, localtime=False, usegmt=False) | python, official-docs, cpython, P0 | Local_Trusted_Corpus |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.