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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
802cd057-97f0-431f-876b-a99a95b5732b | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 26,080 | supabase-export-v2 | 6ee9075604892805 | (in low-level terms). In :term:`CPython`, this could be raised by incorrectly using Python's C API, such as returning a ``NULL`` value without an exception set.
If you're confident that this exception wasn't your fault, or the fault of
a package you're using, you should report this to the author or maintainer
of your... | trusted_official_docs | CPython Docs | (in low-level terms). In :term:`CPython`, this could be raised by incorrectly using Python's C API, such as returning a ``NULL`` value without an exception set.
If you're confident that this exception wasn't your fault, or the fault of
a package you're using, you should report this to the author or maintainer
of your... | (in low-level terms). In :term:`CPython`, this could be raised by incorrectly using Python's C API, such as returning a ``NULL`` value without an exception set.
If you're confident that this exception wasn't your fault, or the fault of
a package you're using, you should report this to the author or maintainer
of your... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8265f8ec-d263-46fa-9dfc-543dc19c2b7d | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 26,051 | supabase-export-v2 | be5f87a4bdf885c5 | If a generator code directly or indirectly raises :exc:`StopIteration`, it is converted into a :exc:`RuntimeError` (retaining the :exc:`StopIteration` as the new exception's cause).
.. versionchanged:: 3.3
Added ``value`` attribute and the ability for generator functions to
use it to return a value. | trusted_official_docs | CPython Docs | If a generator code directly or indirectly raises :exc:`StopIteration`, it is converted into a :exc:`RuntimeError` (retaining the :exc:`StopIteration` as the new exception's cause).
.. versionchanged:: 3.3
Added ``value`` attribute and the ability for generator functions to
use it to return a value. | If a generator code directly or indirectly raises :exc:`StopIteration`, it is converted into a :exc:`RuntimeError` (retaining the :exc:`StopIteration` as the new exception's cause).
.. versionchanged:: 3.3
Added ``value`` attribute and the ability for generator functions to
use it to return a value. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
860c7455-79ca-4639-9f9b-0678409063a6 | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 25,940 | supabase-export-v2 | a369f2dbb9d01f95 | .. method:: with_traceback(tb)
This method sets *tb* as the new traceback for the exception and returns
the exception object. It was more commonly used before the exception
chaining features of :pep:`3134` became available. The following example
shows how we can convert an instance of ``SomeException`` into an
inst... | trusted_official_docs | CPython Docs | .. method:: with_traceback(tb)
This method sets *tb* as the new traceback for the exception and returns
the exception object. It was more commonly used before the exception
chaining features of :pep:`3134` became available. The following example
shows how we can convert an instance of ``SomeException`` into an
inst... | .. method:: with_traceback(tb)
This method sets *tb* as the new traceback for the exception and returns
the exception object. It was more commonly used before the exception
chaining features of :pep:`3134` became available. The following example
shows how we can convert an instance of ``SomeException`` into an
inst... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
86afc6e8-be64-433c-b4ce-ef26ae417b1c | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 26,007 | supabase-export-v2 | be74bfc1a263f254 | .. note::
It should not be used to indicate that an operator or method is not
meant to be supported at all -- in that case either leave the operator /
method undefined or, if a subclass, set it to :data:`None`. | trusted_official_docs | CPython Docs | .. note::
It should not be used to indicate that an operator or method is not
meant to be supported at all -- in that case either leave the operator /
method undefined or, if a subclass, set it to :data:`None`. | .. note::
It should not be used to indicate that an operator or method is not
meant to be supported at all -- in that case either leave the operator /
method undefined or, if a subclass, set it to :data:`None`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9101d09a-7df5-400b-8988-7b0dd2d5d373 | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 26,117 | supabase-export-v2 | 1e09801cd018edac | second argument of a division or modulo operation is zero. The associated value is a string indicating the type of the operands and the operation.
The following exceptions are kept for compatibility with previous versions;
starting from Python 3.3, they are aliases of :exc:`OSError`. | trusted_official_docs | CPython Docs | second argument of a division or modulo operation is zero. The associated value is a string indicating the type of the operands and the operation.
The following exceptions are kept for compatibility with previous versions;
starting from Python 3.3, they are aliases of :exc:`OSError`. | second argument of a division or modulo operation is zero. The associated value is a string indicating the type of the operands and the operation.
The following exceptions are kept for compatibility with previous versions;
starting from Python 3.3, they are aliases of :exc:`OSError`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
92f94137-0866-4ae8-81d3-076d4054cc9c | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 26,032 | supabase-export-v2 | 10dc6bf6d0d4b344 | :meth:`Joining <threading.Thread.join>` a running daemon thread. * :func:`os.fork`, * acquiring a lock such as :class:`threading.Lock`, when it is known that the operation would otherwise deadlock.
See also the :func:`sys.is_finalizing` function. | trusted_official_docs | CPython Docs | :meth:`Joining <threading.Thread.join>` a running daemon thread. * :func:`os.fork`, * acquiring a lock such as :class:`threading.Lock`, when it is known that the operation would otherwise deadlock.
See also the :func:`sys.is_finalizing` function. | :meth:`Joining <threading.Thread.join>` a running daemon thread. * :func:`os.fork`, * acquiring a lock such as :class:`threading.Lock`, when it is known that the operation would otherwise deadlock.
See also the :func:`sys.is_finalizing` function. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
97141749-5344-4c08-8423-1b885b808c48 | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 26,023 | supabase-export-v2 | ed4c4d7498f8c2ae | .. attribute:: filename filename2
For exceptions that involve a file system path (such as :func:`open` or
:func:`os.unlink`), :attr:`filename` is the file name passed to the function. For functions that involve two file system paths (such as
:func:`os.rename`), :attr:`filename2` corresponds to the second
file name p... | trusted_official_docs | CPython Docs | .. attribute:: filename filename2
For exceptions that involve a file system path (such as :func:`open` or
:func:`os.unlink`), :attr:`filename` is the file name passed to the function. For functions that involve two file system paths (such as
:func:`os.rename`), :attr:`filename2` corresponds to the second
file name p... | .. attribute:: filename filename2
For exceptions that involve a file system path (such as :func:`open` or
:func:`os.unlink`), :attr:`filename` is the file name passed to the function. For functions that involve two file system paths (such as
:func:`os.rename`), :attr:`filename2` corresponds to the second
file name p... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
98c7cb6c-dde1-457f-9f8d-ce099b2cd247 | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 26,204 | supabase-export-v2 | 4d5d53e52d7ec16e | .. exception:: ExceptionGroup(msg, excs) .. exception:: BaseExceptionGroup(msg, excs)
Both of these exception types wrap the exceptions in the sequence ``excs``. The ``msg`` parameter must be a string. The difference between the two
classes is that :exc:`BaseExceptionGroup` extends :exc:`BaseException` and
it can wra... | trusted_official_docs | CPython Docs | .. exception:: ExceptionGroup(msg, excs) .. exception:: BaseExceptionGroup(msg, excs)
Both of these exception types wrap the exceptions in the sequence ``excs``. The ``msg`` parameter must be a string. The difference between the two
classes is that :exc:`BaseExceptionGroup` extends :exc:`BaseException` and
it can wra... | .. exception:: ExceptionGroup(msg, excs) .. exception:: BaseExceptionGroup(msg, excs)
Both of these exception types wrap the exceptions in the sequence ``excs``. The ``msg`` parameter must be a string. The difference between the two
classes is that :exc:`BaseExceptionGroup` extends :exc:`BaseException` and
it can wra... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9dd6c6b6-5cc2-4dba-bf8f-400bc088caca | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 26,094 | supabase-export-v2 | 7ca4c2b12a605330 | Raised when a Unicode-related encoding or decoding error occurs. It is a subclass of :exc:`ValueError`.
:exc:`UnicodeError` has attributes that describe the encoding or decoding
error. For example, ``err.object[err.start:err.end]`` gives the particular
invalid input that the codec failed on. | trusted_official_docs | CPython Docs | Raised when a Unicode-related encoding or decoding error occurs. It is a subclass of :exc:`ValueError`.
:exc:`UnicodeError` has attributes that describe the encoding or decoding
error. For example, ``err.object[err.start:err.end]`` gives the particular
invalid input that the codec failed on. | Raised when a Unicode-related encoding or decoding error occurs. It is a subclass of :exc:`ValueError`.
:exc:`UnicodeError` has attributes that describe the encoding or decoding
error. For example, ``err.object[err.start:err.end]`` gives the particular
invalid input that the codec failed on. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a196b2db-e971-4eee-91bf-4871383a892b | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 26,205 | supabase-export-v2 | f3042eb68da67354 | while :exc:`ExceptionGroup` extends :exc:`Exception` and it can only wrap subclasses of :exc:`Exception`. This design is so that ``except Exception`` catches an :exc:`ExceptionGroup` but not :exc:`BaseExceptionGroup`.
The :exc:`BaseExceptionGroup` constructor returns an :exc:`ExceptionGroup`
rather than a :exc:`BaseEx... | trusted_official_docs | CPython Docs | while :exc:`ExceptionGroup` extends :exc:`Exception` and it can only wrap subclasses of :exc:`Exception`. This design is so that ``except Exception`` catches an :exc:`ExceptionGroup` but not :exc:`BaseExceptionGroup`.
The :exc:`BaseExceptionGroup` constructor returns an :exc:`ExceptionGroup`
rather than a :exc:`BaseEx... | while :exc:`ExceptionGroup` extends :exc:`Exception` and it can only wrap subclasses of :exc:`Exception`. This design is so that ``except Exception`` catches an :exc:`ExceptionGroup` but not :exc:`BaseExceptionGroup`.
The :exc:`BaseExceptionGroup` constructor returns an :exc:`ExceptionGroup`
rather than a :exc:`BaseEx... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a2ac7f58-649e-44de-8b21-b38fcd3d0084 | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 26,042 | supabase-export-v2 | 2100957aaa5912f9 | .. exception:: ReferenceError
This exception is raised when a weak reference proxy, created by the
:func:`weakref.proxy` function, is used to access an attribute of the referent
after it has been garbage collected. For more information on weak references,
see the :mod:`weakref` module. | trusted_official_docs | CPython Docs | .. exception:: ReferenceError
This exception is raised when a weak reference proxy, created by the
:func:`weakref.proxy` function, is used to access an attribute of the referent
after it has been garbage collected. For more information on weak references,
see the :mod:`weakref` module. | .. exception:: ReferenceError
This exception is raised when a weak reference proxy, created by the
:func:`weakref.proxy` function, is used to access an attribute of the referent
after it has been garbage collected. For more information on weak references,
see the :mod:`weakref` module. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a2c379c9-96d4-4c7f-b122-0a8627dce87e | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 25,999 | supabase-export-v2 | 2afea9edc71fac05 | .. exception:: NameError
Raised when a local or global name is not found. This applies only to
unqualified names. The associated value is an error message that includes the
name that could not be found. | trusted_official_docs | CPython Docs | .. exception:: NameError
Raised when a local or global name is not found. This applies only to
unqualified names. The associated value is an error message that includes the
name that could not be found. | .. exception:: NameError
Raised when a local or global name is not found. This applies only to
unqualified names. The associated value is an error message that includes the
name that could not be found. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a7bb8a6a-b21c-481d-918c-d8bb6bae14f3 | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 25,928 | supabase-export-v2 | 8e5c84af30c68516 | exception in :attr:`!__cause__` is always shown when present. An implicitly chained exception in :attr:`!__context__` is shown only if :attr:`!__cause__` is :const:`None` and :attr:`!__suppress_context__` is false.
In either case, the exception itself is always shown after any chained
exceptions so that the final line... | trusted_official_docs | CPython Docs | exception in :attr:`!__cause__` is always shown when present. An implicitly chained exception in :attr:`!__context__` is shown only if :attr:`!__cause__` is :const:`None` and :attr:`!__suppress_context__` is false.
In either case, the exception itself is always shown after any chained
exceptions so that the final line... | exception in :attr:`!__cause__` is always shown when present. An implicitly chained exception in :attr:`!__context__` is shown only if :attr:`!__cause__` is :const:`None` and :attr:`!__suppress_context__` is false.
In either case, the exception itself is always shown after any chained
exceptions so that the final line... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a9324227-deee-4cb2-828d-045eff3ac553 | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 26,128 | supabase-export-v2 | 334a3156edca5f8b | .. attribute:: characters_written
An integer containing the number of **bytes** written to the stream
before it blocked. This attribute is available when using the
buffered I/O classes from the :mod:`io` module. | trusted_official_docs | CPython Docs | .. attribute:: characters_written
An integer containing the number of **bytes** written to the stream
before it blocked. This attribute is available when using the
buffered I/O classes from the :mod:`io` module. | .. attribute:: characters_written
An integer containing the number of **bytes** written to the stream
before it blocked. This attribute is available when using the
buffered I/O classes from the :mod:`io` module. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ac299d51-df50-4bcd-bc08-a86d3d3f2d06 | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 26,014 | supabase-export-v2 | 829a8197540509ca | :const:`None` if not specified. For backwards compatibility, if three arguments are passed, the :attr:`~BaseException.args` attribute contains only a 2-tuple of the first two constructor arguments.
The constructor often actually returns a subclass of :exc:`OSError`, as
described in `OS exceptions`_ below. The particul... | trusted_official_docs | CPython Docs | :const:`None` if not specified. For backwards compatibility, if three arguments are passed, the :attr:`~BaseException.args` attribute contains only a 2-tuple of the first two constructor arguments.
The constructor often actually returns a subclass of :exc:`OSError`, as
described in `OS exceptions`_ below. The particul... | :const:`None` if not specified. For backwards compatibility, if three arguments are passed, the :attr:`~BaseException.args` attribute contains only a 2-tuple of the first two constructor arguments.
The constructor often actually returns a subclass of :exc:`OSError`, as
described in `OS exceptions`_ below. The particul... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ace9560a-d1ba-4a6b-807c-277fbadc2662 | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 26,106 | supabase-export-v2 | 2216b52bfaccb734 | The index after the last invalid data in :attr:`object`.
This value should not be negative as it is interpreted as an
absolute offset but this constraint is not enforced at runtime. | trusted_official_docs | CPython Docs | The index after the last invalid data in :attr:`object`.
This value should not be negative as it is interpreted as an
absolute offset but this constraint is not enforced at runtime. | The index after the last invalid data in :attr:`object`.
This value should not be negative as it is interpreted as an
absolute offset but this constraint is not enforced at runtime. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
adbd61e8-d90b-4b54-b794-014bd3b8bcf0 | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 26,225 | supabase-export-v2 | 0fc2634ad0ab21dd | .. doctest::
>>> class MyGroup(ExceptionGroup):
... def derive(self, excs):
... return MyGroup(self.message, excs)
... >>> e = MyGroup("eg", [ValueError(1), TypeError(2)])
>>> e.add_note("a note")
>>> e.__context__ = Exception("context")
>>> e.__cause__ = Exception("cause")
>>> try:
... raise e
... except Exce... | trusted_official_docs | CPython Docs | .. doctest::
>>> class MyGroup(ExceptionGroup):
... def derive(self, excs):
... return MyGroup(self.message, excs)
... >>> e = MyGroup("eg", [ValueError(1), TypeError(2)])
>>> e.add_note("a note")
>>> e.__context__ = Exception("context")
>>> e.__cause__ = Exception("cause")
>>> try:
... raise e
... except Exce... | .. doctest::
>>> class MyGroup(ExceptionGroup):
... def derive(self, excs):
... return MyGroup(self.message, excs)
... >>> e = MyGroup("eg", [ValueError(1), TypeError(2)])
>>> e.add_note("a note")
>>> e.__context__ = Exception("context")
>>> e.__cause__ = Exception("cause")
>>> try:
... raise e
... except Exce... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b09de35a-8204-4e8e-bbba-538f103db80e | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 25,988 | supabase-export-v2 | d2cb9bafbf3fa656 | .. exception:: IndexError
Raised when a sequence subscript is out of range. (Slice indices are
silently truncated to fall in the allowed range; if an index is not an
integer, :exc:`TypeError` is raised.) | trusted_official_docs | CPython Docs | .. exception:: IndexError
Raised when a sequence subscript is out of range. (Slice indices are
silently truncated to fall in the allowed range; if an index is not an
integer, :exc:`TypeError` is raised.) | .. exception:: IndexError
Raised when a sequence subscript is out of range. (Slice indices are
silently truncated to fall in the allowed range; if an index is not an
integer, :exc:`TypeError` is raised.) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b2723983-ee68-4481-b725-d4fbb85b1124 | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 26,126 | supabase-export-v2 | e0452a7cf7a9dab1 | Raised when an operation would block on an object (e.g. socket) set for non-blocking operation. Corresponds to :c:data:`errno` :py:const:`~errno.EAGAIN`, :py:const:`~errno.EALREADY`, :py:const:`~errno.EWOULDBLOCK` and :py:const:`~errno.EINPROGRESS`.
In addition to those of :exc:`OSError`, :exc:`BlockingIOError` can hav... | trusted_official_docs | CPython Docs | Raised when an operation would block on an object (e.g. socket) set for non-blocking operation. Corresponds to :c:data:`errno` :py:const:`~errno.EAGAIN`, :py:const:`~errno.EALREADY`, :py:const:`~errno.EWOULDBLOCK` and :py:const:`~errno.EINPROGRESS`.
In addition to those of :exc:`OSError`, :exc:`BlockingIOError` can hav... | Raised when an operation would block on an object (e.g. socket) set for non-blocking operation. Corresponds to :c:data:`errno` :py:const:`~errno.EAGAIN`, :py:const:`~errno.EALREADY`, :py:const:`~errno.EWOULDBLOCK` and :py:const:`~errno.EINPROGRESS`.
In addition to those of :exc:`OSError`, :exc:`BlockingIOError` can hav... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b4a6c9f5-0923-40ca-8c06-9b14f264fe07 | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 26,089 | supabase-export-v2 | 01cad7d063d6b62f | be. If an object is meant to support a given operation but has not yet provided an implementation, :exc:`NotImplementedError` is the proper exception to raise.
Passing arguments of the wrong type (e.g. passing a :class:`list` when an
:class:`int` is expected) should result in a :exc:`TypeError`, but passing
arguments... | trusted_official_docs | CPython Docs | be. If an object is meant to support a given operation but has not yet provided an implementation, :exc:`NotImplementedError` is the proper exception to raise.
Passing arguments of the wrong type (e.g. passing a :class:`list` when an
:class:`int` is expected) should result in a :exc:`TypeError`, but passing
arguments... | be. If an object is meant to support a given operation but has not yet provided an implementation, :exc:`NotImplementedError` is the proper exception to raise.
Passing arguments of the wrong type (e.g. passing a :class:`list` when an
:class:`int` is expected) should result in a :exc:`TypeError`, but passing
arguments... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b8e474e3-9b45-42cd-b8fa-a3d856be262e | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 26,091 | supabase-export-v2 | 1b0382066afffff0 | .. exception:: UnboundLocalError
Raised when a reference is made to a local variable in a function or method, but
no value has been bound to that variable. This is a subclass of
:exc:`NameError`. | trusted_official_docs | CPython Docs | .. exception:: UnboundLocalError
Raised when a reference is made to a local variable in a function or method, but
no value has been bound to that variable. This is a subclass of
:exc:`NameError`. | .. exception:: UnboundLocalError
Raised when a reference is made to a local variable in a function or method, but
no value has been bound to that variable. This is a subclass of
:exc:`NameError`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b9dd4d3e-24a5-428b-894d-9c06887850ed | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 25,924 | supabase-export-v2 | 83be0f1771c3baa3 | attribute is automatically set to the handled exception. An exception may be handled when an :keyword:`except` or :keyword:`finally` clause, or a :keyword:`with` statement, is used.
This implicit exception context can be
supplemented with an explicit cause by using :keyword:`!from` with
:keyword:`raise`:: | trusted_official_docs | CPython Docs | attribute is automatically set to the handled exception. An exception may be handled when an :keyword:`except` or :keyword:`finally` clause, or a :keyword:`with` statement, is used.
This implicit exception context can be
supplemented with an explicit cause by using :keyword:`!from` with
:keyword:`raise`:: | attribute is automatically set to the handled exception. An exception may be handled when an :keyword:`except` or :keyword:`finally` clause, or a :keyword:`with` statement, is used.
This implicit exception context can be
supplemented with an explicit cause by using :keyword:`!from` with
:keyword:`raise`:: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bcc077db-a088-4ac4-85a8-f41f1e4a6245 | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 25,915 | supabase-export-v2 | 2a595d68afb459a4 | classes from which *it* is derived). Two exception classes that are not related via subclassing are never equivalent, even if they have the same name.
.. index:: pair: statement; raise | trusted_official_docs | CPython Docs | classes from which *it* is derived). Two exception classes that are not related via subclassing are never equivalent, even if they have the same name.
.. index:: pair: statement; raise | classes from which *it* is derived). Two exception classes that are not related via subclassing are never equivalent, even if they have the same name.
.. index:: pair: statement; raise | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c1515991-b790-46e5-b595-f346843141b3 | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 26,082 | supabase-export-v2 | 9242bab3198f278a | .. exception:: SystemExit
This exception is raised by the :func:`sys.exit` function. It inherits from
:exc:`BaseException` instead of :exc:`Exception` so that it is not accidentally
caught by code that catches :exc:`Exception`. This allows the exception to
properly propagate up and cause the interpreter to exit. Whe... | trusted_official_docs | CPython Docs | .. exception:: SystemExit
This exception is raised by the :func:`sys.exit` function. It inherits from
:exc:`BaseException` instead of :exc:`Exception` so that it is not accidentally
caught by code that catches :exc:`Exception`. This allows the exception to
properly propagate up and cause the interpreter to exit. Whe... | .. exception:: SystemExit
This exception is raised by the :func:`sys.exit` function. It inherits from
:exc:`BaseException` instead of :exc:`Exception` so that it is not accidentally
caught by code that catches :exc:`Exception`. This allows the exception to
properly propagate up and cause the interpreter to exit. Whe... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c3beb1ef-b061-45c1-97ae-a03f4cc416dc | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 26,013 | supabase-export-v2 | d83276bb836bc3b3 | function returns a system-related error, including I/O failures such as "file not found" or "disk full" (not for illegal argument types or other incidental errors).
The second form of the constructor sets the corresponding attributes,
described below. The attributes default to :const:`None` if not
specified. For back... | trusted_official_docs | CPython Docs | function returns a system-related error, including I/O failures such as "file not found" or "disk full" (not for illegal argument types or other incidental errors).
The second form of the constructor sets the corresponding attributes,
described below. The attributes default to :const:`None` if not
specified. For back... | function returns a system-related error, including I/O failures such as "file not found" or "disk full" (not for illegal argument types or other incidental errors).
The second form of the constructor sets the corresponding attributes,
described below. The attributes default to :const:`None` if not
specified. For back... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c4cd2dfa-7607-4caa-acfc-db5bee7928fb | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 26,228 | supabase-export-v2 | 85250488fc856e37 | that rather than :meth:`~object.__init__`. For example, the following defines an exception group subclass which accepts an exit_code and constructs the group's message from it. ::
class Errors(ExceptionGroup):
def __new__(cls, errors, exit_code):
self = super().__new__(Errors, f"exit code: {exit_code}", errors)
self... | trusted_official_docs | CPython Docs | that rather than :meth:`~object.__init__`. For example, the following defines an exception group subclass which accepts an exit_code and constructs the group's message from it. ::
class Errors(ExceptionGroup):
def __new__(cls, errors, exit_code):
self = super().__new__(Errors, f"exit code: {exit_code}", errors)
self... | that rather than :meth:`~object.__init__`. For example, the following defines an exception group subclass which accepts an exit_code and constructs the group's message from it. ::
class Errors(ExceptionGroup):
def __new__(cls, errors, exit_code):
self = super().__new__(Errors, f"exit code: {exit_code}", errors)
self... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c6e4ba09-aa75-4c36-b0e3-f8818549540f | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 25,941 | supabase-export-v2 | 912551fd93923738 | traceback of the ``OtherException``, as would have happened to the traceback of the original ``SomeException`` had we allowed it to propagate to the caller. ::
try:
... except SomeException:
tb = sys.exception().__traceback__
raise OtherException(...).with_traceback(tb) | trusted_official_docs | CPython Docs | traceback of the ``OtherException``, as would have happened to the traceback of the original ``SomeException`` had we allowed it to propagate to the caller. ::
try:
... except SomeException:
tb = sys.exception().__traceback__
raise OtherException(...).with_traceback(tb) | traceback of the ``OtherException``, as would have happened to the traceback of the original ``SomeException`` had we allowed it to propagate to the caller. ::
try:
... except SomeException:
tb = sys.exception().__traceback__
raise OtherException(...).with_traceback(tb) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c74f617e-eab8-4275-9c19-c8e90a3d6539 | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 25,936 | supabase-export-v2 | 7d58fd69af914d5d | .. exception:: BaseException
The base class for all built-in exceptions. It is not meant to be directly
inherited by user-defined classes (for that, use :exc:`Exception`). If
:func:`str` is called on an instance of this class, the representation of
the argument(s) to the instance are returned, or the empty string wh... | trusted_official_docs | CPython Docs | .. exception:: BaseException
The base class for all built-in exceptions. It is not meant to be directly
inherited by user-defined classes (for that, use :exc:`Exception`). If
:func:`str` is called on an instance of this class, the representation of
the argument(s) to the instance are returned, or the empty string wh... | .. exception:: BaseException
The base class for all built-in exceptions. It is not meant to be directly
inherited by user-defined classes (for that, use :exc:`Exception`). If
:func:`str` is called on an instance of this class, the representation of
the argument(s) to the instance are returned, or the empty string wh... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ccda0826-4bc0-40ad-ab24-098af409d474 | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 25,918 | supabase-export-v2 | 8b1c8fc3c47ee297 | the situation in which the interpreter raises the same exception; but beware that there is nothing to prevent user code from raising an inappropriate error.
The built-in exception classes can be subclassed to define new exceptions;
programmers are encouraged to derive new exceptions from the :exc:`Exception`
class or o... | trusted_official_docs | CPython Docs | the situation in which the interpreter raises the same exception; but beware that there is nothing to prevent user code from raising an inappropriate error.
The built-in exception classes can be subclassed to define new exceptions;
programmers are encouraged to derive new exceptions from the :exc:`Exception`
class or o... | the situation in which the interpreter raises the same exception; but beware that there is nothing to prevent user code from raising an inappropriate error.
The built-in exception classes can be subclassed to define new exceptions;
programmers are encouraged to derive new exceptions from the :exc:`Exception`
class or o... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ce2651b8-9ddf-4842-8a9e-7331df10bb19 | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 25,973 | supabase-export-v2 | f971e28052f8e733 | .. exception:: GeneratorExit
Raised when a :term:`generator` or :term:`coroutine` is closed;
see :meth:`generator.close` and :meth:`coroutine.close`. It
directly inherits from :exc:`BaseException` instead of :exc:`Exception` since
it is technically not an error. | trusted_official_docs | CPython Docs | .. exception:: GeneratorExit
Raised when a :term:`generator` or :term:`coroutine` is closed;
see :meth:`generator.close` and :meth:`coroutine.close`. It
directly inherits from :exc:`BaseException` instead of :exc:`Exception` since
it is technically not an error. | .. exception:: GeneratorExit
Raised when a :term:`generator` or :term:`coroutine` is closed;
see :meth:`generator.close` and :meth:`coroutine.close`. It
directly inherits from :exc:`BaseException` instead of :exc:`Exception` since
it is technically not an error. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
cf9c2259-d8e2-4150-9600-89f58a9b19fb | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 26,202 | supabase-export-v2 | d8ef9db026a66ecc | Exception groups ----------------
The following are used when it is necessary to raise multiple unrelated
exceptions. They are part of the exception hierarchy so they can be
handled with :keyword:`except` like all other exceptions. In addition,
they are recognised by :keyword:`except*<except_star>`, which matches
their... | trusted_official_docs | CPython Docs | Exception groups ----------------
The following are used when it is necessary to raise multiple unrelated
exceptions. They are part of the exception hierarchy so they can be
handled with :keyword:`except` like all other exceptions. In addition,
they are recognised by :keyword:`except*<except_star>`, which matches
their... | Exception groups ----------------
The following are used when it is necessary to raise multiple unrelated
exceptions. They are part of the exception hierarchy so they can be
handled with :keyword:`except` like all other exceptions. In addition,
they are recognised by :keyword:`except*<except_star>`, which matches
their... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d10e3dc8-92b9-485a-b026-5df49eec77c3 | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 26,114 | supabase-export-v2 | cffb3a9d1221c3a3 | .. exception:: ValueError
Raised when an operation or function receives an argument that has the
right type but an inappropriate value, and the situation is not described by a
more precise exception such as :exc:`IndexError`. | trusted_official_docs | CPython Docs | .. exception:: ValueError
Raised when an operation or function receives an argument that has the
right type but an inappropriate value, and the situation is not described by a
more precise exception such as :exc:`IndexError`. | .. exception:: ValueError
Raised when an operation or function receives an argument that has the
right type but an inappropriate value, and the situation is not described by a
more precise exception such as :exc:`IndexError`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d46a0bd1-8290-438a-b0c3-e102c99f5cf1 | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 26,050 | supabase-export-v2 | aa84268a73140e1c | a new :exc:`StopIteration` instance is raised, and the value returned by the function is used as the :attr:`value` parameter to the constructor of the exception.
If a generator code directly or indirectly raises :exc:`StopIteration`,
it is converted into a :exc:`RuntimeError` (retaining the
:exc:`StopIteration` as th... | trusted_official_docs | CPython Docs | a new :exc:`StopIteration` instance is raised, and the value returned by the function is used as the :attr:`value` parameter to the constructor of the exception.
If a generator code directly or indirectly raises :exc:`StopIteration`,
it is converted into a :exc:`RuntimeError` (retaining the
:exc:`StopIteration` as th... | a new :exc:`StopIteration` instance is raised, and the value returned by the function is used as the :attr:`value` parameter to the constructor of the exception.
If a generator code directly or indirectly raises :exc:`StopIteration`,
it is converted into a :exc:`RuntimeError` (retaining the
:exc:`StopIteration` as th... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d5dfe329-ec59-4205-b75d-afe848c7a5ef | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 25,927 | supabase-export-v2 | 9e8aba460446e09d | exception with the new one for display purposes (e.g. converting :exc:`KeyError` to :exc:`AttributeError`), while leaving the old exception available in :attr:`!__context__` for introspection when debugging.
The default traceback display code shows these chained exceptions in
addition to the traceback for the exceptio... | trusted_official_docs | CPython Docs | exception with the new one for display purposes (e.g. converting :exc:`KeyError` to :exc:`AttributeError`), while leaving the old exception available in :attr:`!__context__` for introspection when debugging.
The default traceback display code shows these chained exceptions in
addition to the traceback for the exceptio... | exception with the new one for display purposes (e.g. converting :exc:`KeyError` to :exc:`AttributeError`), while leaving the old exception available in :attr:`!__context__` for introspection when debugging.
The default traceback display code shows these chained exceptions in
addition to the traceback for the exceptio... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d71a0cf9-a5b8-49bf-a3fd-202ff4b9b0b1 | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 26,217 | supabase-export-v2 | 9319a771da551d33 | the top-level and any nested exception groups. If the condition is true for such an exception group, it is included in the result in full.
.. versionadded:: 3.13
``condition`` can be any callable which is not a type object. | trusted_official_docs | CPython Docs | the top-level and any nested exception groups. If the condition is true for such an exception group, it is included in the result in full.
.. versionadded:: 3.13
``condition`` can be any callable which is not a type object. | the top-level and any nested exception groups. If the condition is true for such an exception group, it is included in the result in full.
.. versionadded:: 3.13
``condition`` can be any callable which is not a type object. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d7e4f5d4-7e1b-4d49-bdcb-8dc94d20149a | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 25,993 | supabase-export-v2 | de76141cc0a6d6e7 | .. exception:: KeyboardInterrupt
Raised when the user hits the interrupt key (normally :kbd:`Control-C` or
:kbd:`Delete`). During execution, a check for interrupts is made
regularly. The exception inherits from :exc:`BaseException` so as to not be
accidentally caught by code that catches :exc:`Exception` and thus pr... | trusted_official_docs | CPython Docs | .. exception:: KeyboardInterrupt
Raised when the user hits the interrupt key (normally :kbd:`Control-C` or
:kbd:`Delete`). During execution, a check for interrupts is made
regularly. The exception inherits from :exc:`BaseException` so as to not be
accidentally caught by code that catches :exc:`Exception` and thus pr... | .. exception:: KeyboardInterrupt
Raised when the user hits the interrupt key (normally :kbd:`Control-C` or
:kbd:`Delete`). During execution, a check for interrupts is made
regularly. The exception inherits from :exc:`BaseException` so as to not be
accidentally caught by code that catches :exc:`Exception` and thus pr... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d92b262f-1911-4f90-810f-ce5cffce43d9 | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 25,970 | supabase-export-v2 | 85753f1b1f1088fc | .. exception:: EOFError
Raised when the :func:`input` function hits an end-of-file condition (EOF)
without reading any data. (Note: the :meth:`io.TextIOBase.read` and
:meth:`io.IOBase.readline` methods return an empty string when they hit EOF.) | trusted_official_docs | CPython Docs | .. exception:: EOFError
Raised when the :func:`input` function hits an end-of-file condition (EOF)
without reading any data. (Note: the :meth:`io.TextIOBase.read` and
:meth:`io.IOBase.readline` methods return an empty string when they hit EOF.) | .. exception:: EOFError
Raised when the :func:`input` function hits an end-of-file condition (EOF)
without reading any data. (Note: the :meth:`io.TextIOBase.read` and
:meth:`io.IOBase.readline` methods return an empty string when they hit EOF.) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e881fa67-65c8-433a-99e7-169b084ca72c | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 26,072 | supabase-export-v2 | baf4242465150c32 | The column in the end line where the error occurred finishes. This is 1-indexed: the first character in the line has an ``offset`` of 1.
For errors in f-string fields, the message is prefixed by "f-string: "
and the offsets are offsets in a text constructed from the replacement
expression. For example, compiling f'Ba... | trusted_official_docs | CPython Docs | The column in the end line where the error occurred finishes. This is 1-indexed: the first character in the line has an ``offset`` of 1.
For errors in f-string fields, the message is prefixed by "f-string: "
and the offsets are offsets in a text constructed from the replacement
expression. For example, compiling f'Ba... | The column in the end line where the error occurred finishes. This is 1-indexed: the first character in the line has an ``offset`` of 1.
For errors in f-string fields, the message is prefixed by "f-string: "
and the offsets are offsets in a text constructed from the replacement
expression. For example, compiling f'Ba... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ee3c4e4c-90d9-49dc-8640-147ae3948a47 | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 26,030 | supabase-export-v2 | 6cf175f5f2e44dec | This exception is derived from :exc:`RuntimeError`. It is raised when an operation is blocked during interpreter shutdown also known as :term:`Python finalization <interpreter shutdown>`.
Examples of operations which can be blocked with a
:exc:`PythonFinalizationError` during the Python finalization: | trusted_official_docs | CPython Docs | This exception is derived from :exc:`RuntimeError`. It is raised when an operation is blocked during interpreter shutdown also known as :term:`Python finalization <interpreter shutdown>`.
Examples of operations which can be blocked with a
:exc:`PythonFinalizationError` during the Python finalization: | This exception is derived from :exc:`RuntimeError`. It is raised when an operation is blocked during interpreter shutdown also known as :term:`Python finalization <interpreter shutdown>`.
Examples of operations which can be blocked with a
:exc:`PythonFinalizationError` during the Python finalization: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ef5463eb-d85c-43bf-becf-7ec141cd6cd0 | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 26,012 | supabase-export-v2 | d9a4cf49e910bcec | .. index:: pair: module; errno
This exception is raised when a system function returns a system-related
error, including I/O failures such as "file not found" or "disk full"
(not for illegal argument types or other incidental errors). | trusted_official_docs | CPython Docs | .. index:: pair: module; errno
This exception is raised when a system function returns a system-related
error, including I/O failures such as "file not found" or "disk full"
(not for illegal argument types or other incidental errors). | .. index:: pair: module; errno
This exception is raised when a system function returns a system-related
error, including I/O failures such as "file not found" or "disk full"
(not for illegal argument types or other incidental errors). | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f1c0fdc0-e12c-4963-997c-4964bb8e450c | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 25,995 | supabase-export-v2 | 11a98fda78a470b5 | .. note::
Catching a :exc:`KeyboardInterrupt` requires special consideration. Because it can be raised at unpredictable points, it may, in some
circumstances, leave the running program in an inconsistent state. It is
generally best to allow :exc:`KeyboardInterrupt` to end the program as
quickly as possible or avoid ... | trusted_official_docs | CPython Docs | .. note::
Catching a :exc:`KeyboardInterrupt` requires special consideration. Because it can be raised at unpredictable points, it may, in some
circumstances, leave the running program in an inconsistent state. It is
generally best to allow :exc:`KeyboardInterrupt` to end the program as
quickly as possible or avoid ... | .. note::
Catching a :exc:`KeyboardInterrupt` requires special consideration. Because it can be raised at unpredictable points, it may, in some
circumstances, leave the running program in an inconsistent state. It is
generally best to allow :exc:`KeyboardInterrupt` to end the program as
quickly as possible or avoid ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f2b2b997-053c-4f0c-90b1-9ceb685cbc8f | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 25,926 | supabase-export-v2 | bf34b84134c7dbb9 | raise new_exc from original_exc
The expression following :keyword:`from<raise>` must be an exception or ``None``. It
will be set as :attr:`!__cause__` on the raised exception. Setting
:attr:`!__cause__` also implicitly sets the :attr:`!__suppress_context__`
attribute to ``True``, so that using ``raise new_exc from N... | trusted_official_docs | CPython Docs | raise new_exc from original_exc
The expression following :keyword:`from<raise>` must be an exception or ``None``. It
will be set as :attr:`!__cause__` on the raised exception. Setting
:attr:`!__cause__` also implicitly sets the :attr:`!__suppress_context__`
attribute to ``True``, so that using ``raise new_exc from N... | raise new_exc from original_exc
The expression following :keyword:`from<raise>` must be an exception or ``None``. It
will be set as :attr:`!__cause__` on the raised exception. Setting
:attr:`!__cause__` also implicitly sets the :attr:`!__suppress_context__`
attribute to ``True``, so that using ``raise new_exc from N... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f4e8720e-35e3-4728-bc00-5d02b55df7be | CPython Docs | file://datasets/cpython/Doc/library/exceptions.rst | unknown | f572fd1d-d5ae-4d99-870d-cc611f4518bf | 26,177 | supabase-export-v2 | 3742a96b1d54a87e | This class is rarely used as emitting a warning about a possible upcoming deprecation is unusual, and :exc:`DeprecationWarning` is preferred for already active deprecations.
Ignored by the default warning filters. Enabling the :ref:`Python
Development Mode <devmode>` shows this warning. | trusted_official_docs | CPython Docs | This class is rarely used as emitting a warning about a possible upcoming deprecation is unusual, and :exc:`DeprecationWarning` is preferred for already active deprecations.
Ignored by the default warning filters. Enabling the :ref:`Python
Development Mode <devmode>` shows this warning. | This class is rarely used as emitting a warning about a possible upcoming deprecation is unusual, and :exc:`DeprecationWarning` is preferred for already active deprecations.
Ignored by the default warning filters. Enabling the :ref:`Python
Development Mode <devmode>` shows this warning. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0c0b91ff-af60-4c51-9b51-46528038c4ab | CPython Docs | file://datasets/cpython/Doc/library/audit_events.rst | unknown | af6b2348-97a2-47f9-baf6-d850bce44986 | 26,242 | supabase-export-v2 | e7eee5af5f94ff28 | The following events are raised internally and do not correspond to any public API of CPython:
+----------------------------+-------------------------------------------+
| Audit event | Arguments |
+============================+===========================================+
| _winapi.CreateFile | ``file_name``, ``desired... | trusted_official_docs | CPython Docs | The following events are raised internally and do not correspond to any public API of CPython:
+----------------------------+-------------------------------------------+
| Audit event | Arguments |
+============================+===========================================+
| _winapi.CreateFile | ``file_name``, ``desired... | The following events are raised internally and do not correspond to any public API of CPython:
+----------------------------+-------------------------------------------+
| Audit event | Arguments |
+============================+===========================================+
| _winapi.CreateFile | ``file_name``, ``desired... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2a1f76cd-1c86-4404-a4b2-f9b11e43b99a | CPython Docs | file://datasets/cpython/Doc/library/audit_events.rst | unknown | af6b2348-97a2-47f9-baf6-d850bce44986 | 26,243 | supabase-export-v2 | fc47dad3e0606791 | ``process_id``, ``desired_access`` | +----------------------------+-------------------------------------------+ | _winapi.TerminateProcess | ``handle``, ``exit_code`` | +----------------------------+-------------------------------------------+ | _posixsubprocess.fork_exec | ``exec_list``, ``args``, ``env`` | +---------... | trusted_official_docs | CPython Docs | ``process_id``, ``desired_access`` | +----------------------------+-------------------------------------------+ | _winapi.TerminateProcess | ``handle``, ``exit_code`` | +----------------------------+-------------------------------------------+ | _posixsubprocess.fork_exec | ``exec_list``, ``args``, ``env`` | +---------... | ``process_id``, ``desired_access`` | +----------------------------+-------------------------------------------+ | _winapi.TerminateProcess | ``handle``, ``exit_code`` | +----------------------------+-------------------------------------------+ | _posixsubprocess.fork_exec | ``exec_list``, ``args``, ``env`` | +---------... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4a831878-a26c-4217-8a59-b2f729fbb9cb | CPython Docs | file://datasets/cpython/Doc/library/audit_events.rst | unknown | af6b2348-97a2-47f9-baf6-d850bce44986 | 26,236 | supabase-export-v2 | 5625db20147fc42d | Audit events table ==================
This table contains all events raised by :func:`sys.audit` or
:c:func:`PySys_Audit` calls throughout the CPython runtime and the
standard library. These calls were added in 3.8 or later (see :pep:`578`). | trusted_official_docs | CPython Docs | Audit events table ==================
This table contains all events raised by :func:`sys.audit` or
:c:func:`PySys_Audit` calls throughout the CPython runtime and the
standard library. These calls were added in 3.8 or later (see :pep:`578`). | Audit events table ==================
This table contains all events raised by :func:`sys.audit` or
:c:func:`PySys_Audit` calls throughout the CPython runtime and the
standard library. These calls were added in 3.8 or later (see :pep:`578`). | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8c9b1a09-b820-41fa-891f-29353887a6b7 | CPython Docs | file://datasets/cpython/Doc/library/audit_events.rst | unknown | af6b2348-97a2-47f9-baf6-d850bce44986 | 26,237 | supabase-export-v2 | 3f313e3a237df257 | events raised by :func:`sys.audit` or :c:func:`PySys_Audit` calls throughout the CPython runtime and the standard library. These calls were added in 3.8 or later (see :pep:`578`).
See :func:`sys.addaudithook` and :c:func:`PySys_AddAuditHook` for
information on handling these events. | trusted_official_docs | CPython Docs | events raised by :func:`sys.audit` or :c:func:`PySys_Audit` calls throughout the CPython runtime and the standard library. These calls were added in 3.8 or later (see :pep:`578`).
See :func:`sys.addaudithook` and :c:func:`PySys_AddAuditHook` for
information on handling these events. | events raised by :func:`sys.audit` or :c:func:`PySys_Audit` calls throughout the CPython runtime and the standard library. These calls were added in 3.8 or later (see :pep:`578`).
See :func:`sys.addaudithook` and :c:func:`PySys_AddAuditHook` for
information on handling these events. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
12166249-8654-4c22-b7cc-6c49164a4144 | CPython Docs | file://datasets/cpython/Doc/library/poplib.rst | unknown | 93279495-1c90-4ea7-9ace-30901ac52b40 | 26,260 | supabase-export-v2 | 7926b82300d15ee0 | .. class:: POP3_SSL(host, port=POP3_SSL_PORT, *, timeout=None, context=None)
This is a subclass of :class:`POP3` that connects to the server over an SSL
encrypted socket. If *port* is not specified, 995, the standard POP3-over-SSL
port is used. *timeout* works as in the :class:`POP3` constructor. *context* is an opti... | trusted_official_docs | CPython Docs | .. class:: POP3_SSL(host, port=POP3_SSL_PORT, *, timeout=None, context=None)
This is a subclass of :class:`POP3` that connects to the server over an SSL
encrypted socket. If *port* is not specified, 995, the standard POP3-over-SSL
port is used. *timeout* works as in the :class:`POP3` constructor. *context* is an opti... | .. class:: POP3_SSL(host, port=POP3_SSL_PORT, *, timeout=None, context=None)
This is a subclass of :class:`POP3` that connects to the server over an SSL
encrypted socket. If *port* is not specified, 995, the standard POP3-over-SSL
port is used. *timeout* works as in the :class:`POP3` constructor. *context* is an opti... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1438846b-b58d-4afe-a6f8-5174ee1e2f3c | CPython Docs | file://datasets/cpython/Doc/library/poplib.rst | unknown | 93279495-1c90-4ea7-9ace-30901ac52b40 | 26,264 | supabase-export-v2 | ee2a89438fec8afe | will raise an :ref:`auditing event <auditing>` ``poplib.putline`` with arguments ``self`` and ``line``, where ``line`` is the bytes about to be sent to the remote host.
.. versionchanged:: 3.2
*context* parameter added. | trusted_official_docs | CPython Docs | will raise an :ref:`auditing event <auditing>` ``poplib.putline`` with arguments ``self`` and ``line``, where ``line`` is the bytes about to be sent to the remote host.
.. versionchanged:: 3.2
*context* parameter added. | will raise an :ref:`auditing event <auditing>` ``poplib.putline`` with arguments ``self`` and ``line``, where ``line`` is the bytes about to be sent to the remote host.
.. versionchanged:: 3.2
*context* parameter added. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1eb804a1-4952-41e8-b46c-7663104e9ae4 | CPython Docs | file://datasets/cpython/Doc/library/poplib.rst | unknown | 93279495-1c90-4ea7-9ace-30901ac52b40 | 26,267 | supabase-export-v2 | c7252b11750bf7c3 | .. versionchanged:: 3.9 If the *timeout* parameter is set to be zero, it will raise a :class:`ValueError` to prevent the creation of a non-blocking socket.
.. versionchanged:: 3.12
The deprecated *keyfile* and *certfile* parameters have been removed. | trusted_official_docs | CPython Docs | .. versionchanged:: 3.9 If the *timeout* parameter is set to be zero, it will raise a :class:`ValueError` to prevent the creation of a non-blocking socket.
.. versionchanged:: 3.12
The deprecated *keyfile* and *certfile* parameters have been removed. | .. versionchanged:: 3.9 If the *timeout* parameter is set to be zero, it will raise a :class:`ValueError` to prevent the creation of a non-blocking socket.
.. versionchanged:: 3.12
The deprecated *keyfile* and *certfile* parameters have been removed. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2d89d9b3-cbf2-4179-83c2-d6b86b3e378c | CPython Docs | file://datasets/cpython/Doc/library/poplib.rst | unknown | 93279495-1c90-4ea7-9ace-30901ac52b40 | 26,263 | supabase-export-v2 | c9aa836ad204759f | .. audit-event:: poplib.putline self,line poplib.POP3_SSL
All commands will raise an :ref:`auditing event <auditing>`
``poplib.putline`` with arguments ``self`` and ``line``,
where ``line`` is the bytes about to be sent to the remote host. | trusted_official_docs | CPython Docs | .. audit-event:: poplib.putline self,line poplib.POP3_SSL
All commands will raise an :ref:`auditing event <auditing>`
``poplib.putline`` with arguments ``self`` and ``line``,
where ``line`` is the bytes about to be sent to the remote host. | .. audit-event:: poplib.putline self,line poplib.POP3_SSL
All commands will raise an :ref:`auditing event <auditing>`
``poplib.putline`` with arguments ``self`` and ``line``,
where ``line`` is the bytes about to be sent to the remote host. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
33cb04ae-fc47-4da5-89d3-469bb6c5f682 | CPython Docs | file://datasets/cpython/Doc/library/poplib.rst | unknown | 93279495-1c90-4ea7-9ace-30901ac52b40 | 26,257 | supabase-export-v2 | c4630fa6ad2d2d85 | .. audit-event:: poplib.putline self,line poplib.POP3
All commands will raise an :ref:`auditing event <auditing>`
``poplib.putline`` with arguments ``self`` and ``line``,
where ``line`` is the bytes about to be sent to the remote host. | trusted_official_docs | CPython Docs | .. audit-event:: poplib.putline self,line poplib.POP3
All commands will raise an :ref:`auditing event <auditing>`
``poplib.putline`` with arguments ``self`` and ``line``,
where ``line`` is the bytes about to be sent to the remote host. | .. audit-event:: poplib.putline self,line poplib.POP3
All commands will raise an :ref:`auditing event <auditing>`
``poplib.putline`` with arguments ``self`` and ``line``,
where ``line`` is the bytes about to be sent to the remote host. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
36dc25fe-eccd-4f30-bcbc-c84964a96c38 | CPython Docs | file://datasets/cpython/Doc/library/poplib.rst | unknown | 93279495-1c90-4ea7-9ace-30901ac52b40 | 26,278 | supabase-export-v2 | 743665eca2a470fb | .. method:: POP3.set_debuglevel(level)
Set the instance's debugging level. This controls the amount of debugging
output printed. The default, ``0``, produces no debugging output. A value of
``1`` produces a moderate amount of debugging output, generally a single line
per request. A value of ``2`` or higher produces ... | trusted_official_docs | CPython Docs | .. method:: POP3.set_debuglevel(level)
Set the instance's debugging level. This controls the amount of debugging
output printed. The default, ``0``, produces no debugging output. A value of
``1`` produces a moderate amount of debugging output, generally a single line
per request. A value of ``2`` or higher produces ... | .. method:: POP3.set_debuglevel(level)
Set the instance's debugging level. This controls the amount of debugging
output printed. The default, ``0``, produces no debugging output. A value of
``1`` produces a moderate amount of debugging output, generally a single line
per request. A value of ``2`` or higher produces ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3a1b0593-4cbd-4e28-8984-73fbbf4e7e3d | CPython Docs | file://datasets/cpython/Doc/library/poplib.rst | unknown | 93279495-1c90-4ea7-9ace-30901ac52b40 | 26,258 | supabase-export-v2 | 5c41748ff60fc695 | will raise an :ref:`auditing event <auditing>` ``poplib.putline`` with arguments ``self`` and ``line``, where ``line`` is the bytes about to be sent to the remote host.
.. versionchanged:: 3.9
If the *timeout* parameter is set to be zero, it will raise a
:class:`ValueError` to prevent the creation of a non-blocking s... | trusted_official_docs | CPython Docs | will raise an :ref:`auditing event <auditing>` ``poplib.putline`` with arguments ``self`` and ``line``, where ``line`` is the bytes about to be sent to the remote host.
.. versionchanged:: 3.9
If the *timeout* parameter is set to be zero, it will raise a
:class:`ValueError` to prevent the creation of a non-blocking s... | will raise an :ref:`auditing event <auditing>` ``poplib.putline`` with arguments ``self`` and ``line``, where ``line`` is the bytes about to be sent to the remote host.
.. versionchanged:: 3.9
If the *timeout* parameter is set to be zero, it will raise a
:class:`ValueError` to prevent the creation of a non-blocking s... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4d223fd0-9146-487e-ba79-1d5b94c67c0c | CPython Docs | file://datasets/cpython/Doc/library/poplib.rst | unknown | 93279495-1c90-4ea7-9ace-30901ac52b40 | 26,259 | supabase-export-v2 | accad6d24719a292 | .. versionchanged:: 3.9 If the *timeout* parameter is set to be zero, it will raise a :class:`ValueError` to prevent the creation of a non-blocking socket.
.. class:: POP3_SSL(host, port=POP3_SSL_PORT, *, timeout=None, context=None) | trusted_official_docs | CPython Docs | .. versionchanged:: 3.9 If the *timeout* parameter is set to be zero, it will raise a :class:`ValueError` to prevent the creation of a non-blocking socket.
.. class:: POP3_SSL(host, port=POP3_SSL_PORT, *, timeout=None, context=None) | .. versionchanged:: 3.9 If the *timeout* parameter is set to be zero, it will raise a :class:`ValueError` to prevent the creation of a non-blocking socket.
.. class:: POP3_SSL(host, port=POP3_SSL_PORT, *, timeout=None, context=None) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5149bc5c-56a9-46cf-af18-1d520fedd767 | CPython Docs | file://datasets/cpython/Doc/library/poplib.rst | unknown | 93279495-1c90-4ea7-9ace-30901ac52b40 | 26,270 | supabase-export-v2 | 581e9aaea35152c5 | .. exception:: error_proto
Exception raised on any errors from this module (errors from :mod:`socket`
module are not caught). The reason for the exception is passed to the
constructor as a string. | trusted_official_docs | CPython Docs | .. exception:: error_proto
Exception raised on any errors from this module (errors from :mod:`socket`
module are not caught). The reason for the exception is passed to the
constructor as a string. | .. exception:: error_proto
Exception raised on any errors from this module (errors from :mod:`socket`
module are not caught). The reason for the exception is passed to the
constructor as a string. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5388f6f2-4942-4fa8-b1f1-26a46e831e31 | CPython Docs | file://datasets/cpython/Doc/library/poplib.rst | unknown | 93279495-1c90-4ea7-9ace-30901ac52b40 | 26,255 | supabase-export-v2 | 6f9f1e628501c393 | used. The optional *timeout* parameter specifies a timeout in seconds for the connection attempt (if not specified, the global default timeout setting will be used).
.. audit-event:: poplib.connect self,host,port poplib.POP3 | trusted_official_docs | CPython Docs | used. The optional *timeout* parameter specifies a timeout in seconds for the connection attempt (if not specified, the global default timeout setting will be used).
.. audit-event:: poplib.connect self,host,port poplib.POP3 | used. The optional *timeout* parameter specifies a timeout in seconds for the connection attempt (if not specified, the global default timeout setting will be used).
.. audit-event:: poplib.connect self,host,port poplib.POP3 | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5fe6ad52-8312-427b-ae25-d54589ccd372 | CPython Docs | file://datasets/cpython/Doc/library/poplib.rst | unknown | 93279495-1c90-4ea7-9ace-30901ac52b40 | 26,250 | supabase-export-v2 | 81b9327e209c18fd | Additionally, this module provides a class :class:`POP3_SSL`, which provides support for connecting to POP3 servers that use SSL as an underlying protocol layer.
Note that POP3, though widely supported, is obsolescent. The implementation
quality of POP3 servers varies widely, and too many are quite poor. If your
mailse... | trusted_official_docs | CPython Docs | Additionally, this module provides a class :class:`POP3_SSL`, which provides support for connecting to POP3 servers that use SSL as an underlying protocol layer.
Note that POP3, though widely supported, is obsolescent. The implementation
quality of POP3 servers varies widely, and too many are quite poor. If your
mailse... | Additionally, this module provides a class :class:`POP3_SSL`, which provides support for connecting to POP3 servers that use SSL as an underlying protocol layer.
Note that POP3, though widely supported, is obsolescent. The implementation
quality of POP3 servers varies widely, and too many are quite poor. If your
mailse... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
65865be9-7f2f-4770-a32a-7be44cb08d2e | CPython Docs | file://datasets/cpython/Doc/library/poplib.rst | unknown | 93279495-1c90-4ea7-9ace-30901ac52b40 | 26,266 | supabase-export-v2 | 413386b96569af03 | .. versionchanged:: 3.4 The class now supports hostname check with :attr:`ssl.SSLContext.check_hostname` and *Server Name Indication* (see :const:`ssl.HAS_SNI`).
.. versionchanged:: 3.9
If the *timeout* parameter is set to be zero, it will raise a
:class:`ValueError` to prevent the creation of a non-blocking socket. | trusted_official_docs | CPython Docs | .. versionchanged:: 3.4 The class now supports hostname check with :attr:`ssl.SSLContext.check_hostname` and *Server Name Indication* (see :const:`ssl.HAS_SNI`).
.. versionchanged:: 3.9
If the *timeout* parameter is set to be zero, it will raise a
:class:`ValueError` to prevent the creation of a non-blocking socket. | .. versionchanged:: 3.4 The class now supports hostname check with :attr:`ssl.SSLContext.check_hostname` and *Server Name Indication* (see :const:`ssl.HAS_SNI`).
.. versionchanged:: 3.9
If the *timeout* parameter is set to be zero, it will raise a
:class:`ValueError` to prevent the creation of a non-blocking socket. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
70c40f09-599b-4b36-94b8-9df3e0915ba2 | CPython Docs | file://datasets/cpython/Doc/library/poplib.rst | unknown | 93279495-1c90-4ea7-9ace-30901ac52b40 | 26,317 | supabase-export-v2 | 93eda3b6f60a89dd | a :class:`ssl.SSLContext` object which allows bundling SSL configuration options, certificates and private keys into a single (potentially long-lived) structure. Please read :ref:`ssl-security` for best practices.
This method supports hostname checking via
:attr:`ssl.SSLContext.check_hostname` and *Server Name Indicat... | trusted_official_docs | CPython Docs | a :class:`ssl.SSLContext` object which allows bundling SSL configuration options, certificates and private keys into a single (potentially long-lived) structure. Please read :ref:`ssl-security` for best practices.
This method supports hostname checking via
:attr:`ssl.SSLContext.check_hostname` and *Server Name Indicat... | a :class:`ssl.SSLContext` object which allows bundling SSL configuration options, certificates and private keys into a single (potentially long-lived) structure. Please read :ref:`ssl-security` for best practices.
This method supports hostname checking via
:attr:`ssl.SSLContext.check_hostname` and *Server Name Indicat... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
790bca2f-c782-4bb3-8900-d04ab13c93ba | CPython Docs | file://datasets/cpython/Doc/library/poplib.rst | unknown | 93279495-1c90-4ea7-9ace-30901ac52b40 | 26,299 | supabase-export-v2 | c4f7cbfe7945cc21 | .. method:: POP3.dele(which)
Flag message number *which* for deletion. On most servers deletions are not
actually performed until QUIT (the major exception is Eudora QPOP, which
deliberately violates the RFCs by doing pending deletes on any disconnect). | trusted_official_docs | CPython Docs | .. method:: POP3.dele(which)
Flag message number *which* for deletion. On most servers deletions are not
actually performed until QUIT (the major exception is Eudora QPOP, which
deliberately violates the RFCs by doing pending deletes on any disconnect). | .. method:: POP3.dele(which)
Flag message number *which* for deletion. On most servers deletions are not
actually performed until QUIT (the major exception is Eudora QPOP, which
deliberately violates the RFCs by doing pending deletes on any disconnect). | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
80178f50-cb8a-469d-945c-791e2b8bb14c | CPython Docs | file://datasets/cpython/Doc/library/poplib.rst | unknown | 93279495-1c90-4ea7-9ace-30901ac52b40 | 26,249 | supabase-export-v2 | b558aa245d9311ee | optional command sets from :rfc:`1939`. The :class:`POP3` class also supports the ``STLS`` command introduced in :rfc:`2595` to enable encrypted communication on an already established connection.
Additionally, this module provides a class :class:`POP3_SSL`, which provides
support for connecting to POP3 servers that us... | trusted_official_docs | CPython Docs | optional command sets from :rfc:`1939`. The :class:`POP3` class also supports the ``STLS`` command introduced in :rfc:`2595` to enable encrypted communication on an already established connection.
Additionally, this module provides a class :class:`POP3_SSL`, which provides
support for connecting to POP3 servers that us... | optional command sets from :rfc:`1939`. The :class:`POP3` class also supports the ``STLS`` command introduced in :rfc:`2595` to enable encrypted communication on an already established connection.
Additionally, this module provides a class :class:`POP3_SSL`, which provides
support for connecting to POP3 servers that us... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b1c33dcd-04be-4f2a-bcb2-80a59f1bd144 | CPython Docs | file://datasets/cpython/Doc/library/poplib.rst | unknown | 93279495-1c90-4ea7-9ace-30901ac52b40 | 26,324 | supabase-export-v2 | 5c1a0d316a914435 | M = poplib.POP3('localhost') M.user(getpass.getuser()) M.pass_(getpass.getpass()) numMessages = len(M.list()[1]) for i in range(numMessages): for j in M.retr(i+1)[1]: print(j)
At the end of the module, there is a test section that contains a more extensive
example of usage. | trusted_official_docs | CPython Docs | M = poplib.POP3('localhost') M.user(getpass.getuser()) M.pass_(getpass.getpass()) numMessages = len(M.list()[1]) for i in range(numMessages): for j in M.retr(i+1)[1]: print(j)
At the end of the module, there is a test section that contains a more extensive
example of usage. | M = poplib.POP3('localhost') M.user(getpass.getuser()) M.pass_(getpass.getpass()) numMessages = len(M.list()[1]) for i in range(numMessages): for j in M.retr(i+1)[1]: print(j)
At the end of the module, there is a test section that contains a more extensive
example of usage. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b43dc257-a537-464c-9467-581e40d6313f | CPython Docs | file://datasets/cpython/Doc/library/poplib.rst | unknown | 93279495-1c90-4ea7-9ace-30901ac52b40 | 26,316 | supabase-export-v2 | 2362091ca37defa5 | Start a TLS session on the active connection as specified in :rfc:`2595`. This is only allowed before user authentication
*context* parameter is a :class:`ssl.SSLContext` object which allows
bundling SSL configuration options, certificates and private keys into
a single (potentially long-lived) structure. Please read... | trusted_official_docs | CPython Docs | Start a TLS session on the active connection as specified in :rfc:`2595`. This is only allowed before user authentication
*context* parameter is a :class:`ssl.SSLContext` object which allows
bundling SSL configuration options, certificates and private keys into
a single (potentially long-lived) structure. Please read... | Start a TLS session on the active connection as specified in :rfc:`2595`. This is only allowed before user authentication
*context* parameter is a :class:`ssl.SSLContext` object which allows
bundling SSL configuration options, certificates and private keys into
a single (potentially long-lived) structure. Please read... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d6ab2c2c-0cb9-48a1-bdbb-062d53dbeab7 | CPython Docs | file://datasets/cpython/Doc/library/poplib.rst | unknown | 93279495-1c90-4ea7-9ace-30901ac52b40 | 26,308 | supabase-export-v2 | 9801b56720379e7d | Retrieves the message header plus *howmuch* lines of the message after the header of message number *which*. Result is in form ``(response, ['line', ...], octets)``.
The POP3 TOP command this method uses, unlike the RETR command, doesn't set the
message's seen flag; unfortunately, TOP is poorly specified in the RFCs a... | trusted_official_docs | CPython Docs | Retrieves the message header plus *howmuch* lines of the message after the header of message number *which*. Result is in form ``(response, ['line', ...], octets)``.
The POP3 TOP command this method uses, unlike the RETR command, doesn't set the
message's seen flag; unfortunately, TOP is poorly specified in the RFCs a... | Retrieves the message header plus *howmuch* lines of the message after the header of message number *which*. Result is in form ``(response, ['line', ...], octets)``.
The POP3 TOP command this method uses, unlike the RETR command, doesn't set the
message's seen flag; unfortunately, TOP is poorly specified in the RFCs a... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d7da3e25-d367-499b-b18c-f28ad101baa7 | CPython Docs | file://datasets/cpython/Doc/library/poplib.rst | unknown | 93279495-1c90-4ea7-9ace-30901ac52b40 | 26,248 | supabase-export-v2 | 044611f5bb4f56db | --------------
This module defines a class, :class:`POP3`, which encapsulates a connection to a
POP3 server and implements the protocol as defined in :rfc:`1939`. The
:class:`POP3` class supports both the minimal and optional command sets from
:rfc:`1939`. The :class:`POP3` class also supports the ``STLS`` command intr... | trusted_official_docs | CPython Docs | --------------
This module defines a class, :class:`POP3`, which encapsulates a connection to a
POP3 server and implements the protocol as defined in :rfc:`1939`. The
:class:`POP3` class supports both the minimal and optional command sets from
:rfc:`1939`. The :class:`POP3` class also supports the ``STLS`` command intr... | --------------
This module defines a class, :class:`POP3`, which encapsulates a connection to a
POP3 server and implements the protocol as defined in :rfc:`1939`. The
:class:`POP3` class supports both the minimal and optional command sets from
:rfc:`1939`. The :class:`POP3` class also supports the ``STLS`` command intr... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
da5bf3e6-7acc-454a-9367-120a19d5829c | CPython Docs | file://datasets/cpython/Doc/library/poplib.rst | unknown | 93279495-1c90-4ea7-9ace-30901ac52b40 | 26,273 | supabase-export-v2 | 946ce89fda9185b9 | Module :mod:`imaplib` The standard Python IMAP module.
`Frequently Asked Questions About Fetchmail <http://www.catb.org/~esr/fetchmail/fetchmail-FAQ.html>`_
The FAQ for the :program:`fetchmail` POP/IMAP client collects information on
POP3 server variations and RFC noncompliance that may be useful if you need to
writ... | trusted_official_docs | CPython Docs | Module :mod:`imaplib` The standard Python IMAP module.
`Frequently Asked Questions About Fetchmail <http://www.catb.org/~esr/fetchmail/fetchmail-FAQ.html>`_
The FAQ for the :program:`fetchmail` POP/IMAP client collects information on
POP3 server variations and RFC noncompliance that may be useful if you need to
writ... | Module :mod:`imaplib` The standard Python IMAP module.
`Frequently Asked Questions About Fetchmail <http://www.catb.org/~esr/fetchmail/fetchmail-FAQ.html>`_
The FAQ for the :program:`fetchmail` POP/IMAP client collects information on
POP3 server variations and RFC noncompliance that may be useful if you need to
writ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
dc10aff7-37c2-4b2e-839b-f168f6e5927c | CPython Docs | file://datasets/cpython/Doc/library/poplib.rst | unknown | 93279495-1c90-4ea7-9ace-30901ac52b40 | 26,261 | supabase-export-v2 | 3b4ab12d741e7e21 | optional :class:`ssl.SSLContext` object which allows bundling SSL configuration options, certificates and private keys into a single (potentially long-lived) structure. Please read :ref:`ssl-security` for best practices.
.. audit-event:: poplib.connect self,host,port poplib.POP3_SSL | trusted_official_docs | CPython Docs | optional :class:`ssl.SSLContext` object which allows bundling SSL configuration options, certificates and private keys into a single (potentially long-lived) structure. Please read :ref:`ssl-security` for best practices.
.. audit-event:: poplib.connect self,host,port poplib.POP3_SSL | optional :class:`ssl.SSLContext` object which allows bundling SSL configuration options, certificates and private keys into a single (potentially long-lived) structure. Please read :ref:`ssl-security` for best practices.
.. audit-event:: poplib.connect self,host,port poplib.POP3_SSL | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e0ce5da5-f498-42c9-9e00-d9f6d781eb3a | CPython Docs | file://datasets/cpython/Doc/library/poplib.rst | unknown | 93279495-1c90-4ea7-9ace-30901ac52b40 | 26,310 | supabase-export-v2 | f5f8cf2fd63d1793 | .. method:: POP3.uidl(which=None)
Return message digest (unique id) list. If *which* is specified, result contains
the unique id for that message in the form ``'response mesgnum uid``, otherwise
result is list ``(response, ['mesgnum uid', ...], octets)``. | trusted_official_docs | CPython Docs | .. method:: POP3.uidl(which=None)
Return message digest (unique id) list. If *which* is specified, result contains
the unique id for that message in the form ``'response mesgnum uid``, otherwise
result is list ``(response, ['mesgnum uid', ...], octets)``. | .. method:: POP3.uidl(which=None)
Return message digest (unique id) list. If *which* is specified, result contains
the unique id for that message in the form ``'response mesgnum uid``, otherwise
result is list ``(response, ['mesgnum uid', ...], octets)``. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e7619c02-a851-4fd9-8eb5-d30a5066cb53 | CPython Docs | file://datasets/cpython/Doc/library/poplib.rst | unknown | 93279495-1c90-4ea7-9ace-30901ac52b40 | 26,254 | supabase-export-v2 | 35168caa9910db71 | .. class:: POP3(host, port=POP3_PORT[, timeout])
This class implements the actual POP3 protocol. The connection is created when
the instance is initialized. If *port* is omitted, the standard POP3 port (110)
is used. The optional *timeout* parameter specifies a timeout in seconds for the
connection attempt (if not s... | trusted_official_docs | CPython Docs | .. class:: POP3(host, port=POP3_PORT[, timeout])
This class implements the actual POP3 protocol. The connection is created when
the instance is initialized. If *port* is omitted, the standard POP3 port (110)
is used. The optional *timeout* parameter specifies a timeout in seconds for the
connection attempt (if not s... | .. class:: POP3(host, port=POP3_PORT[, timeout])
This class implements the actual POP3 protocol. The connection is created when
the instance is initialized. If *port* is omitted, the standard POP3 port (110)
is used. The optional *timeout* parameter specifies a timeout in seconds for the
connection attempt (if not s... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
14e47f33-4b83-4a60-8bf9-fde8468e010a | CPython Docs | file://datasets/cpython/Doc/library/allos.rst | unknown | 0233bd50-cdf1-4c8b-8b3c-b99758975844 | 26,326 | supabase-export-v2 | 2d661a79c73b03dc | ********************************* Generic Operating System Services *********************************
The modules described in this chapter provide interfaces to operating system
features that are available on (almost) all operating systems, such as files and
a clock. The interfaces are generally modeled after the Unix... | trusted_official_docs | CPython Docs | ********************************* Generic Operating System Services *********************************
The modules described in this chapter provide interfaces to operating system
features that are available on (almost) all operating systems, such as files and
a clock. The interfaces are generally modeled after the Unix... | ********************************* Generic Operating System Services *********************************
The modules described in this chapter provide interfaces to operating system
features that are available on (almost) all operating systems, such as files and
a clock. The interfaces are generally modeled after the Unix... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0a65c3d6-04fd-4345-9061-e9c4729ab8f4 | CPython Docs | file://datasets/cpython/Doc/library/bisect.rst | unknown | b800042e-7086-4e80-9b2b-8b0b152283a5 | 26,382 | supabase-export-v2 | 327be201aab2c018 | >>> Movie = namedtuple('Movie', ('name', 'released', 'director'))
>>> movies = [
... Movie('Jaws', 1975, 'Spielberg'),
... Movie('Titanic', 1997, 'Cameron'),
... Movie('The Birds', 1963, 'Hitchcock'),
... Movie('Aliens', 1986, 'Cameron')
... ] | trusted_official_docs | CPython Docs | >>> Movie = namedtuple('Movie', ('name', 'released', 'director'))
>>> movies = [
... Movie('Jaws', 1975, 'Spielberg'),
... Movie('Titanic', 1997, 'Cameron'),
... Movie('The Birds', 1963, 'Hitchcock'),
... Movie('Aliens', 1986, 'Cameron')
... ] | >>> Movie = namedtuple('Movie', ('name', 'released', 'director'))
>>> movies = [
... Movie('Jaws', 1975, 'Spielberg'),
... Movie('Titanic', 1997, 'Cameron'),
... Movie('The Birds', 1963, 'Hitchcock'),
... Movie('Aliens', 1986, 'Cameron')
... ] | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0b005515-3452-4ebf-9258-ff1567310853 | CPython Docs | file://datasets/cpython/Doc/library/bisect.rst | unknown | b800042e-7086-4e80-9b2b-8b0b152283a5 | 26,379 | supabase-export-v2 | b4a4da329a66c748 | 90], score) ... return "FDCBA"[i] ... >>> [grade(score) for score in [33, 99, 77, 70, 89, 90, 100]] ['F', 'A', 'C', 'C', 'B', 'A', 'A']
The :py:func:`~bisect.bisect` and :py:func:`~bisect.insort` functions also work with
lists of tuples. The *key* argument can serve to extract the field used for ordering
records in a t... | trusted_official_docs | CPython Docs | 90], score) ... return "FDCBA"[i] ... >>> [grade(score) for score in [33, 99, 77, 70, 89, 90, 100]] ['F', 'A', 'C', 'C', 'B', 'A', 'A']
The :py:func:`~bisect.bisect` and :py:func:`~bisect.insort` functions also work with
lists of tuples. The *key* argument can serve to extract the field used for ordering
records in a t... | 90], score) ... return "FDCBA"[i] ... >>> [grade(score) for score in [33, 99, 77, 70, 89, 90, 100]] ['F', 'A', 'C', 'C', 'B', 'A', 'A']
The :py:func:`~bisect.bisect` and :py:func:`~bisect.insort` functions also work with
lists of tuples. The *key* argument can serve to extract the field used for ordering
records in a t... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0d1dec42-92c8-40f1-b777-2c99989d33f2 | CPython Docs | file://datasets/cpython/Doc/library/bisect.rst | unknown | b800042e-7086-4e80-9b2b-8b0b152283a5 | 26,340 | supabase-export-v2 | fff8a583f2db3d6e | .. function:: bisect_left(a, x, lo=0, hi=len(a), *, key=None)
Locate the insertion point for *x* in *a* to maintain sorted order. The parameters *lo* and *hi* may be used to specify a subset of the list
which should be considered; by default the entire list is used. If *x* is
already present in *a*, the insertion poi... | trusted_official_docs | CPython Docs | .. function:: bisect_left(a, x, lo=0, hi=len(a), *, key=None)
Locate the insertion point for *x* in *a* to maintain sorted order. The parameters *lo* and *hi* may be used to specify a subset of the list
which should be considered; by default the entire list is used. If *x* is
already present in *a*, the insertion poi... | .. function:: bisect_left(a, x, lo=0, hi=len(a), *, key=None)
Locate the insertion point for *x* in *a* to maintain sorted order. The parameters *lo* and *hi* may be used to specify a subset of the list
which should be considered; by default the entire list is used. If *x* is
already present in *a*, the insertion poi... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0fb2bf30-774c-4e88-8ce9-a4f351653a33 | CPython Docs | file://datasets/cpython/Doc/library/bisect.rst | unknown | b800042e-7086-4e80-9b2b-8b0b152283a5 | 26,365 | supabase-export-v2 | a72bc4836bb8eeff | * The *insort()* functions are *O*\ (*n*) because the logarithmic search step is dominated by the linear time insertion step.
* The search functions are stateless and discard key function results after
they are used. Consequently, if the search functions are used in a loop,
the key function may be called again and ag... | trusted_official_docs | CPython Docs | * The *insort()* functions are *O*\ (*n*) because the logarithmic search step is dominated by the linear time insertion step.
* The search functions are stateless and discard key function results after
they are used. Consequently, if the search functions are used in a loop,
the key function may be called again and ag... | * The *insort()* functions are *O*\ (*n*) because the logarithmic search step is dominated by the linear time insertion step.
* The search functions are stateless and discard key function results after
they are used. Consequently, if the search functions are used in a loop,
the key function may be called again and ag... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
10123eb4-be0e-4328-8591-1fb6bb77d93f | CPython Docs | file://datasets/cpython/Doc/library/bisect.rst | unknown | b800042e-7086-4e80-9b2b-8b0b152283a5 | 26,336 | supabase-export-v2 | 034f807288af71a8 | .. note::
The functions in this module are not thread-safe. If multiple threads
concurrently use :mod:`!bisect` functions on the same sequence, this
may result in undefined behaviour. Likewise, if the provided sequence
is mutated by a different thread while a :mod:`!bisect` function
is operating on it, the result i... | trusted_official_docs | CPython Docs | .. note::
The functions in this module are not thread-safe. If multiple threads
concurrently use :mod:`!bisect` functions on the same sequence, this
may result in undefined behaviour. Likewise, if the provided sequence
is mutated by a different thread while a :mod:`!bisect` function
is operating on it, the result i... | .. note::
The functions in this module are not thread-safe. If multiple threads
concurrently use :mod:`!bisect` functions on the same sequence, this
may result in undefined behaviour. Likewise, if the provided sequence
is mutated by a different thread while a :mod:`!bisect` function
is operating on it, the result i... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
161ce2f5-8604-49f2-abfc-5f0809b579d5 | CPython Docs | file://datasets/cpython/Doc/library/bisect.rst | unknown | b800042e-7086-4e80-9b2b-8b0b152283a5 | 26,375 | supabase-export-v2 | c511feff213f4567 | def find_gt(a, x): 'Find leftmost value greater than x' i = bisect_right(a, x) if i != len(a): return a[i] raise ValueError
def find_ge(a, x):
'Find leftmost item greater than or equal to x'
i = bisect_left(a, x)
if i != len(a):
return a[i]
raise ValueError | trusted_official_docs | CPython Docs | def find_gt(a, x): 'Find leftmost value greater than x' i = bisect_right(a, x) if i != len(a): return a[i] raise ValueError
def find_ge(a, x):
'Find leftmost item greater than or equal to x'
i = bisect_left(a, x)
if i != len(a):
return a[i]
raise ValueError | def find_gt(a, x): 'Find leftmost value greater than x' i = bisect_right(a, x) if i != len(a): return a[i] raise ValueError
def find_ge(a, x):
'Find leftmost item greater than or equal to x'
i = bisect_left(a, x)
if i != len(a):
return a[i]
raise ValueError | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
20c000f9-98d2-4b8b-ab31-d53eb69a2ab4 | CPython Docs | file://datasets/cpython/Doc/library/bisect.rst | unknown | b800042e-7086-4e80-9b2b-8b0b152283a5 | 26,383 | supabase-export-v2 | e9bab2bf22d5da75 | >>> movies = [ ... Movie('Jaws', 1975, 'Spielberg'), ... Movie('Titanic', 1997, 'Cameron'), ... Movie('The Birds', 1963, 'Hitchcock'), ... Movie('Aliens', 1986, 'Cameron') ... ]
>>> # Find the first movie released after 1960
>>> by_year = attrgetter('released')
>>> movies.sort(key=by_year)
>>> movies[bisect(movies, ... | trusted_official_docs | CPython Docs | >>> movies = [ ... Movie('Jaws', 1975, 'Spielberg'), ... Movie('Titanic', 1997, 'Cameron'), ... Movie('The Birds', 1963, 'Hitchcock'), ... Movie('Aliens', 1986, 'Cameron') ... ]
>>> # Find the first movie released after 1960
>>> by_year = attrgetter('released')
>>> movies.sort(key=by_year)
>>> movies[bisect(movies, ... | >>> movies = [ ... Movie('Jaws', 1975, 'Spielberg'), ... Movie('Titanic', 1997, 'Cameron'), ... Movie('The Birds', 1963, 'Hitchcock'), ... Movie('Aliens', 1986, 'Cameron') ... ]
>>> # Find the first movie released after 1960
>>> by_year = attrgetter('released')
>>> movies.sort(key=by_year)
>>> movies[bisect(movies, ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
23e936f0-9831-47d7-b663-0f462771292a | CPython Docs | file://datasets/cpython/Doc/library/bisect.rst | unknown | b800042e-7086-4e80-9b2b-8b0b152283a5 | 26,353 | supabase-export-v2 | 90ad8bf91f81df94 | support inserting records in a table, the *key* function (if any) is applied to *x* for the search step but not for the insertion step.
Keep in mind that the *O*\ (log *n*) search is dominated by the slow *O*\ (*n*)
insertion step. | trusted_official_docs | CPython Docs | support inserting records in a table, the *key* function (if any) is applied to *x* for the search step but not for the insertion step.
Keep in mind that the *O*\ (log *n*) search is dominated by the slow *O*\ (*n*)
insertion step. | support inserting records in a table, the *key* function (if any) is applied to *x* for the search step but not for the insertion step.
Keep in mind that the *O*\ (log *n*) search is dominated by the slow *O*\ (*n*)
insertion step. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
26adb37a-2f2a-492d-b0b5-9bceb9841f22 | CPython Docs | file://datasets/cpython/Doc/library/bisect.rst | unknown | b800042e-7086-4e80-9b2b-8b0b152283a5 | 26,377 | supabase-export-v2 | 71a1b7592b44e6d2 | .. _bisect-example:
The :py:func:`~bisect.bisect` function can be useful for numeric table lookups. This
example uses :py:func:`~bisect.bisect` to look up a letter grade for an exam score (say)
based on a set of ordered numeric breakpoints: 90 and up is an 'A', 80 to 89 is
a 'B', and so on:: | trusted_official_docs | CPython Docs | .. _bisect-example:
The :py:func:`~bisect.bisect` function can be useful for numeric table lookups. This
example uses :py:func:`~bisect.bisect` to look up a letter grade for an exam score (say)
based on a set of ordered numeric breakpoints: 90 and up is an 'A', 80 to 89 is
a 'B', and so on:: | .. _bisect-example:
The :py:func:`~bisect.bisect` function can be useful for numeric table lookups. This
example uses :py:func:`~bisect.bisect` to look up a letter grade for an exam score (say)
based on a set of ordered numeric breakpoints: 90 and up is an 'A', 80 to 89 is
a 'B', and so on:: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2ed9739a-1f71-4121-9de5-77b44c3854a5 | CPython Docs | file://datasets/cpython/Doc/library/bisect.rst | unknown | b800042e-7086-4e80-9b2b-8b0b152283a5 | 26,374 | supabase-export-v2 | 68efc9c40fe49923 | def find_le(a, x): 'Find rightmost value less than or equal to x' i = bisect_right(a, x) if i: return a[i-1] raise ValueError
def find_gt(a, x):
'Find leftmost value greater than x'
i = bisect_right(a, x)
if i != len(a):
return a[i]
raise ValueError | trusted_official_docs | CPython Docs | def find_le(a, x): 'Find rightmost value less than or equal to x' i = bisect_right(a, x) if i: return a[i-1] raise ValueError
def find_gt(a, x):
'Find leftmost value greater than x'
i = bisect_right(a, x)
if i != len(a):
return a[i]
raise ValueError | def find_le(a, x): 'Find rightmost value less than or equal to x' i = bisect_right(a, x) if i: return a[i-1] raise ValueError
def find_gt(a, x):
'Find leftmost value greater than x'
i = bisect_right(a, x)
if i != len(a):
return a[i]
raise ValueError | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
43d8c82c-90c9-47d0-89bc-d81fd781ad34 | CPython Docs | file://datasets/cpython/Doc/library/bisect.rst | unknown | b800042e-7086-4e80-9b2b-8b0b152283a5 | 26,380 | supabase-export-v2 | 3f5ad058b5e5babb | and :py:func:`~bisect.insort` functions also work with lists of tuples. The *key* argument can serve to extract the field used for ordering records in a table::
>>> from collections import namedtuple
>>> from operator import attrgetter
>>> from bisect import bisect, insort
>>> from pprint import pprint | trusted_official_docs | CPython Docs | and :py:func:`~bisect.insort` functions also work with lists of tuples. The *key* argument can serve to extract the field used for ordering records in a table::
>>> from collections import namedtuple
>>> from operator import attrgetter
>>> from bisect import bisect, insort
>>> from pprint import pprint | and :py:func:`~bisect.insort` functions also work with lists of tuples. The *key* argument can serve to extract the field used for ordering records in a table::
>>> from collections import namedtuple
>>> from operator import attrgetter
>>> from bisect import bisect, insort
>>> from pprint import pprint | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
458b2304-91fe-487f-84a8-358c478896f2 | CPython Docs | file://datasets/cpython/Doc/library/bisect.rst | unknown | b800042e-7086-4e80-9b2b-8b0b152283a5 | 26,364 | supabase-export-v2 | 0a158b3059e0fd92 | * Bisection is effective for searching ranges of values. For locating specific values, dictionaries are more performant.
* The *insort()* functions are *O*\ (*n*) because the logarithmic search step
is dominated by the linear time insertion step. | trusted_official_docs | CPython Docs | * Bisection is effective for searching ranges of values. For locating specific values, dictionaries are more performant.
* The *insort()* functions are *O*\ (*n*) because the logarithmic search step
is dominated by the linear time insertion step. | * Bisection is effective for searching ranges of values. For locating specific values, dictionaries are more performant.
* The *insort()* functions are *O*\ (*n*) because the logarithmic search step
is dominated by the linear time insertion step. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4dd9e519-62ec-459f-b07a-327988ad50d9 | CPython Docs | file://datasets/cpython/Doc/library/bisect.rst | unknown | b800042e-7086-4e80-9b2b-8b0b152283a5 | 26,346 | supabase-export-v2 | 9d4d4a30d7489cff | .. function:: bisect_right(a, x, lo=0, hi=len(a), *, key=None) bisect(a, x, lo=0, hi=len(a), *, key=None)
Similar to :py:func:`~bisect.bisect_left`, but returns an insertion point which comes
after (to the right of) any existing entries of *x* in *a*. | trusted_official_docs | CPython Docs | .. function:: bisect_right(a, x, lo=0, hi=len(a), *, key=None) bisect(a, x, lo=0, hi=len(a), *, key=None)
Similar to :py:func:`~bisect.bisect_left`, but returns an insertion point which comes
after (to the right of) any existing entries of *x* in *a*. | .. function:: bisect_right(a, x, lo=0, hi=len(a), *, key=None) bisect(a, x, lo=0, hi=len(a), *, key=None)
Similar to :py:func:`~bisect.bisect_left`, but returns an insertion point which comes
after (to the right of) any existing entries of *x* in *a*. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4e2e9f3e-670e-4a6f-8d2c-d89750b257a2 | CPython Docs | file://datasets/cpython/Doc/library/bisect.rst | unknown | b800042e-7086-4e80-9b2b-8b0b152283a5 | 26,368 | supabase-export-v2 | ac1cb70ab00f5431 | * `Sorted Collections <https://grantjenks.com/docs/sortedcollections/>`_ is a high performance module that uses *bisect* to managed sorted collections of data.
* The `SortedCollection recipe
<https://code.activestate.com/recipes/577197-sortedcollection/>`_ uses
bisect to build a full-featured collection class with st... | trusted_official_docs | CPython Docs | * `Sorted Collections <https://grantjenks.com/docs/sortedcollections/>`_ is a high performance module that uses *bisect* to managed sorted collections of data.
* The `SortedCollection recipe
<https://code.activestate.com/recipes/577197-sortedcollection/>`_ uses
bisect to build a full-featured collection class with st... | * `Sorted Collections <https://grantjenks.com/docs/sortedcollections/>`_ is a high performance module that uses *bisect* to managed sorted collections of data.
* The `SortedCollection recipe
<https://code.activestate.com/recipes/577197-sortedcollection/>`_ uses
bisect to build a full-featured collection class with st... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
6323fae4-31b2-4069-8809-c859589bf9f4 | CPython Docs | file://datasets/cpython/Doc/library/bisect.rst | unknown | b800042e-7086-4e80-9b2b-8b0b152283a5 | 26,343 | supabase-export-v2 | 8fb09d78f96e568a | extract a comparison key from each element in the array. To support searching complex records, the key function is not applied to the *x* value.
If *key* is ``None``, the elements are compared directly and
no key function is called. | trusted_official_docs | CPython Docs | extract a comparison key from each element in the array. To support searching complex records, the key function is not applied to the *x* value.
If *key* is ``None``, the elements are compared directly and
no key function is called. | extract a comparison key from each element in the array. To support searching complex records, the key function is not applied to the *x* value.
If *key* is ``None``, the elements are compared directly and
no key function is called. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
6d121f75-4835-49fe-8fb2-0e948471c30f | CPython Docs | file://datasets/cpython/Doc/library/bisect.rst | unknown | b800042e-7086-4e80-9b2b-8b0b152283a5 | 26,352 | supabase-export-v2 | b510a8f1d94b091a | :py:func:`~bisect.bisect_left` to locate an insertion point. Next, it runs the :meth:`~sequence.insert` method on *a* to insert *x* at the appropriate position to maintain sort order.
To support inserting records in a table, the *key* function (if any) is
applied to *x* for the search step but not for the insertion st... | trusted_official_docs | CPython Docs | :py:func:`~bisect.bisect_left` to locate an insertion point. Next, it runs the :meth:`~sequence.insert` method on *a* to insert *x* at the appropriate position to maintain sort order.
To support inserting records in a table, the *key* function (if any) is
applied to *x* for the search step but not for the insertion st... | :py:func:`~bisect.bisect_left` to locate an insertion point. Next, it runs the :meth:`~sequence.insert` method on *a* to insert *x* at the appropriate position to maintain sort order.
To support inserting records in a table, the *key* function (if any) is
applied to *x* for the search step but not for the insertion st... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7093833b-c08b-4024-97e1-4b014e0470a6 | CPython Docs | file://datasets/cpython/Doc/library/bisect.rst | unknown | b800042e-7086-4e80-9b2b-8b0b152283a5 | 26,363 | supabase-export-v2 | 0c5b7ca0c9f859b6 | When writing time sensitive code using *bisect()* and *insort()*, keep these thoughts in mind:
* Bisection is effective for searching ranges of values. For locating specific values, dictionaries are more performant. | trusted_official_docs | CPython Docs | When writing time sensitive code using *bisect()* and *insort()*, keep these thoughts in mind:
* Bisection is effective for searching ranges of values. For locating specific values, dictionaries are more performant. | When writing time sensitive code using *bisect()* and *insort()*, keep these thoughts in mind:
* Bisection is effective for searching ranges of values. For locating specific values, dictionaries are more performant. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
755de992-bfde-455c-a97e-8427baca8851 | CPython Docs | file://datasets/cpython/Doc/library/bisect.rst | unknown | b800042e-7086-4e80-9b2b-8b0b152283a5 | 26,347 | supabase-export-v2 | 503707348782034d | Similar to :py:func:`~bisect.bisect_left`, but returns an insertion point which comes after (to the right of) any existing entries of *x* in *a*.
The returned insertion point *ip* partitions the array *a* into two slices
such that ``all(elem <= x for elem in a[lo : ip])`` is true for the left slice and
``all(elem > x... | trusted_official_docs | CPython Docs | Similar to :py:func:`~bisect.bisect_left`, but returns an insertion point which comes after (to the right of) any existing entries of *x* in *a*.
The returned insertion point *ip* partitions the array *a* into two slices
such that ``all(elem <= x for elem in a[lo : ip])`` is true for the left slice and
``all(elem > x... | Similar to :py:func:`~bisect.bisect_left`, but returns an insertion point which comes after (to the right of) any existing entries of *x* in *a*.
The returned insertion point *ip* partitions the array *a* into two slices
such that ``all(elem <= x for elem in a[lo : ip])`` is true for the left slice and
``all(elem > x... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
790aef6d-983c-495d-8d77-1edf01661a3e | CPython Docs | file://datasets/cpython/Doc/library/bisect.rst | unknown | b800042e-7086-4e80-9b2b-8b0b152283a5 | 26,386 | supabase-export-v2 | e29c4d8c86a1e98e | function is expensive, it is possible to avoid repeated function calls by searching a list of precomputed keys to find the index of a record::
>>> data = [('red', 5), ('blue', 1), ('yellow', 8), ('black', 0)]
>>> data.sort(key=lambda r: r[1]) # Or use operator.itemgetter(1). >>> keys = [r[1] for r in data] # Precomput... | trusted_official_docs | CPython Docs | function is expensive, it is possible to avoid repeated function calls by searching a list of precomputed keys to find the index of a record::
>>> data = [('red', 5), ('blue', 1), ('yellow', 8), ('black', 0)]
>>> data.sort(key=lambda r: r[1]) # Or use operator.itemgetter(1). >>> keys = [r[1] for r in data] # Precomput... | function is expensive, it is possible to avoid repeated function calls by searching a list of precomputed keys to find the index of a record::
>>> data = [('red', 5), ('blue', 1), ('yellow', 8), ('black', 0)]
>>> data.sort(key=lambda r: r[1]) # Or use operator.itemgetter(1). >>> keys = [r[1] for r in data] # Precomput... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7c00e0a2-4cca-44e7-abae-e42862247922 | CPython Docs | file://datasets/cpython/Doc/library/bisect.rst | unknown | b800042e-7086-4e80-9b2b-8b0b152283a5 | 26,357 | supabase-export-v2 | 3d9fc3ac5bd9f0d0 | Similar to :py:func:`~bisect.insort_left`, but inserting *x* in *a* after any existing entries of *x*.
This function first runs :py:func:`~bisect.bisect_right` to locate an insertion point. Next, it runs the :meth:`~sequence.insert` method on *a* to insert *x* at the
appropriate position to maintain sort order. | trusted_official_docs | CPython Docs | Similar to :py:func:`~bisect.insort_left`, but inserting *x* in *a* after any existing entries of *x*.
This function first runs :py:func:`~bisect.bisect_right` to locate an insertion point. Next, it runs the :meth:`~sequence.insert` method on *a* to insert *x* at the
appropriate position to maintain sort order. | Similar to :py:func:`~bisect.insort_left`, but inserting *x* in *a* after any existing entries of *x*.
This function first runs :py:func:`~bisect.bisect_right` to locate an insertion point. Next, it runs the :meth:`~sequence.insert` method on *a* to insert *x* at the
appropriate position to maintain sort order. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7c9c871c-1939-4857-906f-13d4627a0836 | CPython Docs | file://datasets/cpython/Doc/library/bisect.rst | unknown | b800042e-7086-4e80-9b2b-8b0b152283a5 | 26,384 | supabase-export-v2 | a33e213596383056 | >>> # Find the first movie released after 1960 >>> by_year = attrgetter('released') >>> movies.sort(key=by_year) >>> movies[bisect(movies, 1960, key=by_year)] Movie(name='The Birds', released=1963, director='Hitchcock')
>>> # Insert a movie while maintaining sort order
>>> romance = Movie('Love Story', 1970, 'Hiller')... | trusted_official_docs | CPython Docs | >>> # Find the first movie released after 1960 >>> by_year = attrgetter('released') >>> movies.sort(key=by_year) >>> movies[bisect(movies, 1960, key=by_year)] Movie(name='The Birds', released=1963, director='Hitchcock')
>>> # Insert a movie while maintaining sort order
>>> romance = Movie('Love Story', 1970, 'Hiller')... | >>> # Find the first movie released after 1960 >>> by_year = attrgetter('released') >>> movies.sort(key=by_year) >>> movies[bisect(movies, 1960, key=by_year)] Movie(name='The Birds', released=1963, director='Hitchcock')
>>> # Insert a movie while maintaining sort order
>>> romance = Movie('Love Story', 1970, 'Hiller')... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
87d8b9b5-0b29-4041-b66a-155fe40679fa | CPython Docs | file://datasets/cpython/Doc/library/bisect.rst | unknown | b800042e-7086-4e80-9b2b-8b0b152283a5 | 26,378 | supabase-export-v2 | cf59cc0a64799ade | score (say) based on a set of ordered numeric breakpoints: 90 and up is an 'A', 80 to 89 is a 'B', and so on::
>>> def grade(score)
... i = bisect([60, 70, 80, 90], score)
... return "FDCBA"[i]
... >>> [grade(score) for score in [33, 99, 77, 70, 89, 90, 100]]
['F', 'A', 'C', 'C', 'B', 'A', 'A'] | trusted_official_docs | CPython Docs | score (say) based on a set of ordered numeric breakpoints: 90 and up is an 'A', 80 to 89 is a 'B', and so on::
>>> def grade(score)
... i = bisect([60, 70, 80, 90], score)
... return "FDCBA"[i]
... >>> [grade(score) for score in [33, 99, 77, 70, 89, 90, 100]]
['F', 'A', 'C', 'C', 'B', 'A', 'A'] | score (say) based on a set of ordered numeric breakpoints: 90 and up is an 'A', 80 to 89 is a 'B', and so on::
>>> def grade(score)
... i = bisect([60, 70, 80, 90], score)
... return "FDCBA"[i]
... >>> [grade(score) for score in [33, 99, 77, 70, 89, 90, 100]]
['F', 'A', 'C', 'C', 'B', 'A', 'A'] | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
87f916a9-d92d-4546-bc22-ca594e09163d | CPython Docs | file://datasets/cpython/Doc/library/bisect.rst | unknown | b800042e-7086-4e80-9b2b-8b0b152283a5 | 26,373 | supabase-export-v2 | 17f4483e8e8dd2f9 | def find_lt(a, x): 'Find rightmost value less than x' i = bisect_left(a, x) if i: return a[i-1] raise ValueError
def find_le(a, x):
'Find rightmost value less than or equal to x'
i = bisect_right(a, x)
if i:
return a[i-1]
raise ValueError | trusted_official_docs | CPython Docs | def find_lt(a, x): 'Find rightmost value less than x' i = bisect_left(a, x) if i: return a[i-1] raise ValueError
def find_le(a, x):
'Find rightmost value less than or equal to x'
i = bisect_right(a, x)
if i:
return a[i-1]
raise ValueError | def find_lt(a, x): 'Find rightmost value less than x' i = bisect_left(a, x) if i: return a[i-1] raise ValueError
def find_le(a, x):
'Find rightmost value less than or equal to x'
i = bisect_right(a, x)
if i:
return a[i-1]
raise ValueError | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8880a680-157e-4968-bef6-2228ff48e509 | CPython Docs | file://datasets/cpython/Doc/library/bisect.rst | unknown | b800042e-7086-4e80-9b2b-8b0b152283a5 | 26,370 | supabase-export-v2 | 3066f82b15d24f02 | Searching Sorted Lists ----------------------
The above `bisect functions`_ are useful for finding insertion points but
can be tricky or awkward to use for common searching tasks. The following five
functions show how to transform them into the standard lookups for sorted
lists:: | trusted_official_docs | CPython Docs | Searching Sorted Lists ----------------------
The above `bisect functions`_ are useful for finding insertion points but
can be tricky or awkward to use for common searching tasks. The following five
functions show how to transform them into the standard lookups for sorted
lists:: | Searching Sorted Lists ----------------------
The above `bisect functions`_ are useful for finding insertion points but
can be tricky or awkward to use for common searching tasks. The following five
functions show how to transform them into the standard lookups for sorted
lists:: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
97863af4-6a78-4017-b7f7-b6b7a11ed046 | CPython Docs | file://datasets/cpython/Doc/library/bisect.rst | unknown | b800042e-7086-4e80-9b2b-8b0b152283a5 | 26,341 | supabase-export-v2 | f74a20e7b2378dc8 | the left of) any existing entries. The return value is suitable for use as the first parameter to ``list.insert()`` assuming that *a* is already sorted.
The returned insertion point *ip* partitions the array *a* into two
slices such that ``all(elem < x for elem in a[lo : ip])`` is true for the
left slice and ``all(el... | trusted_official_docs | CPython Docs | the left of) any existing entries. The return value is suitable for use as the first parameter to ``list.insert()`` assuming that *a* is already sorted.
The returned insertion point *ip* partitions the array *a* into two
slices such that ``all(elem < x for elem in a[lo : ip])`` is true for the
left slice and ``all(el... | the left of) any existing entries. The return value is suitable for use as the first parameter to ``list.insert()`` assuming that *a* is already sorted.
The returned insertion point *ip* partitions the array *a* into two
slices such that ``all(elem < x for elem in a[lo : ip])`` is true for the
left slice and ``all(el... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a432090b-36bf-4352-9e3c-2f12ccc1a6fc | CPython Docs | file://datasets/cpython/Doc/library/bisect.rst | unknown | b800042e-7086-4e80-9b2b-8b0b152283a5 | 26,342 | supabase-export-v2 | 9f3bff8606d6f4a5 | a[lo : ip])`` is true for the left slice and ``all(elem >= x for elem in a[ip : hi])`` is true for the right slice.
*key* specifies a :term:`key function` of one argument that is used to
extract a comparison key from each element in the array. To support
searching complex records, the key function is not applied to t... | trusted_official_docs | CPython Docs | a[lo : ip])`` is true for the left slice and ``all(elem >= x for elem in a[ip : hi])`` is true for the right slice.
*key* specifies a :term:`key function` of one argument that is used to
extract a comparison key from each element in the array. To support
searching complex records, the key function is not applied to t... | a[lo : ip])`` is true for the left slice and ``all(elem >= x for elem in a[ip : hi])`` is true for the right slice.
*key* specifies a :term:`key function` of one argument that is used to
extract a comparison key from each element in the array. To support
searching complex records, the key function is not applied to t... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ca429c22-84b5-4c2d-9f29-d3e5b2da4d6e | CPython Docs | file://datasets/cpython/Doc/library/bisect.rst | unknown | b800042e-7086-4e80-9b2b-8b0b152283a5 | 26,371 | supabase-export-v2 | c0e5b45b7756adc7 | tricky or awkward to use for common searching tasks. The following five functions show how to transform them into the standard lookups for sorted lists::
def index(a, x):
'Locate the leftmost value exactly equal to x'
i = bisect_left(a, x)
if i != len(a) and a[i] == x:
return i
raise ValueError | trusted_official_docs | CPython Docs | tricky or awkward to use for common searching tasks. The following five functions show how to transform them into the standard lookups for sorted lists::
def index(a, x):
'Locate the leftmost value exactly equal to x'
i = bisect_left(a, x)
if i != len(a) and a[i] == x:
return i
raise ValueError | tricky or awkward to use for common searching tasks. The following five functions show how to transform them into the standard lookups for sorted lists::
def index(a, x):
'Locate the leftmost value exactly equal to x'
i = bisect_left(a, x)
if i != len(a) and a[i] == x:
return i
raise ValueError | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ca87b5c1-e16d-4b16-8a63-9031de03a73b | CPython Docs | file://datasets/cpython/Doc/library/bisect.rst | unknown | b800042e-7086-4e80-9b2b-8b0b152283a5 | 26,348 | supabase-export-v2 | ded3859dfe192525 | a[lo : ip])`` is true for the left slice and ``all(elem > x for elem in a[ip : hi])`` is true for the right slice.
.. versionchanged:: 3.10
Added the *key* parameter. | trusted_official_docs | CPython Docs | a[lo : ip])`` is true for the left slice and ``all(elem > x for elem in a[ip : hi])`` is true for the right slice.
.. versionchanged:: 3.10
Added the *key* parameter. | a[lo : ip])`` is true for the left slice and ``all(elem > x for elem in a[ip : hi])`` is true for the right slice.
.. versionchanged:: 3.10
Added the *key* parameter. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
cab8ad5d-f197-452f-8f1b-ec84bd017ecf | CPython Docs | file://datasets/cpython/Doc/library/bisect.rst | unknown | b800042e-7086-4e80-9b2b-8b0b152283a5 | 26,385 | supabase-export-v2 | 3074d09fc8c8fc93 | 1970, 'Hiller') >>> insort(movies, romance, key=by_year) >>> pprint(movies) [Movie(name='The Birds', released=1963, director='Hitchcock'), Movie(name='Love Story', released=1970, director='Hiller'), Movie(name='Jaws', released=1975, director='Spielberg'), Movie(name='Aliens', released=1986, director='Cameron'), Movie(n... | trusted_official_docs | CPython Docs | 1970, 'Hiller') >>> insort(movies, romance, key=by_year) >>> pprint(movies) [Movie(name='The Birds', released=1963, director='Hitchcock'), Movie(name='Love Story', released=1970, director='Hiller'), Movie(name='Jaws', released=1975, director='Spielberg'), Movie(name='Aliens', released=1986, director='Cameron'), Movie(n... | 1970, 'Hiller') >>> insort(movies, romance, key=by_year) >>> pprint(movies) [Movie(name='The Birds', released=1963, director='Hitchcock'), Movie(name='Love Story', released=1970, director='Hiller'), Movie(name='Jaws', released=1975, director='Spielberg'), Movie(name='Aliens', released=1986, director='Cameron'), Movie(n... | 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.