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
561fa5d4-705f-4133-bfbf-ea65e34d2052
CPython Docs
file://datasets/cpython/Doc/library/bdb.rst
unknown
f3c3e3e8-7784-4211-ae88-c8fd31ad14af
38,176
supabase-export-v2
2671908bc46e087b
a frame, depending on the type of event (passed as a string) that is about to be executed. *event* can be one of the following: * ``"line"``: A new line of code is going to be executed. * ``"call"``: A function is about to be called, or another code block entered. * ``"return"``: A function or other code block is abou...
trusted_official_docs
CPython Docs
a frame, depending on the type of event (passed as a string) that is about to be executed. *event* can be one of the following: * ``"line"``: A new line of code is going to be executed. * ``"call"``: A function is about to be called, or another code block entered. * ``"return"``: A function or other code block is abou...
a frame, depending on the type of event (passed as a string) that is about to be executed. *event* can be one of the following: * ``"line"``: A new line of code is going to be executed. * ``"call"``: A function is about to be called, or another code block entered. * ``"return"``: A function or other code block is abou...
python, official-docs, cpython, P0
Local_Trusted_Corpus
5ada668a-2c9f-44ab-8ad0-00195c5ca18b
CPython Docs
file://datasets/cpython/Doc/library/bdb.rst
unknown
f3c3e3e8-7784-4211-ae88-c8fd31ad14af
38,250
supabase-export-v2
6240525132f0bec9
Return all breakpoints that are set. Derived classes and clients can call the following methods to disable and restart events to achieve better performance. These methods only work when using the ``'monitoring'`` backend.
trusted_official_docs
CPython Docs
Return all breakpoints that are set. Derived classes and clients can call the following methods to disable and restart events to achieve better performance. These methods only work when using the ``'monitoring'`` backend.
Return all breakpoints that are set. Derived classes and clients can call the following methods to disable and restart events to achieve better performance. These methods only work when using the ``'monitoring'`` backend.
python, official-docs, cpython, P0
Local_Trusted_Corpus
62cedf60-0ee1-46eb-ade8-fb512e547849
CPython Docs
file://datasets/cpython/Doc/library/bdb.rst
unknown
f3c3e3e8-7784-4211-ae88-c8fd31ad14af
38,174
supabase-export-v2
5e704135dafcccd6
.. method:: trace_dispatch(frame, event, arg) This function is installed as the trace function of debugged frames. Its return value is the new trace function (in most cases, that is, itself).
trusted_official_docs
CPython Docs
.. method:: trace_dispatch(frame, event, arg) This function is installed as the trace function of debugged frames. Its return value is the new trace function (in most cases, that is, itself).
.. method:: trace_dispatch(frame, event, arg) This function is installed as the trace function of debugged frames. Its return value is the new trace function (in most cases, that is, itself).
python, official-docs, cpython, P0
Local_Trusted_Corpus
66156796-436e-4f28-bf3f-e3f2d5f98b33
CPython Docs
file://datasets/cpython/Doc/library/bdb.rst
unknown
f3c3e3e8-7784-4211-ae88-c8fd31ad14af
38,123
supabase-export-v2
9808cae38369b29d
.. method:: deleteMe() Delete the breakpoint from the list associated to a file/line. If it is the last breakpoint in that position, it also deletes the entry for the file/line.
trusted_official_docs
CPython Docs
.. method:: deleteMe() Delete the breakpoint from the list associated to a file/line. If it is the last breakpoint in that position, it also deletes the entry for the file/line.
.. method:: deleteMe() Delete the breakpoint from the list associated to a file/line. If it is the last breakpoint in that position, it also deletes the entry for the file/line.
python, official-docs, cpython, P0
Local_Trusted_Corpus
66dc03a4-0428-4858-8468-8a50bbd47f22
CPython Docs
file://datasets/cpython/Doc/library/bdb.rst
unknown
f3c3e3e8-7784-4211-ae88-c8fd31ad14af
38,183
supabase-export-v2
bc6edb3fb0e8e465
.. method:: dispatch_call(frame, arg) If the debugger should stop on this function call, invoke the :meth:`user_call` method (which should be overridden in subclasses). Raise a :exc:`BdbQuit` exception if the :attr:`quitting <Bdb.set_quit>` flag is set (which can be set from :meth:`user_call`). Return a reference to ...
trusted_official_docs
CPython Docs
.. method:: dispatch_call(frame, arg) If the debugger should stop on this function call, invoke the :meth:`user_call` method (which should be overridden in subclasses). Raise a :exc:`BdbQuit` exception if the :attr:`quitting <Bdb.set_quit>` flag is set (which can be set from :meth:`user_call`). Return a reference to ...
.. method:: dispatch_call(frame, arg) If the debugger should stop on this function call, invoke the :meth:`user_call` method (which should be overridden in subclasses). Raise a :exc:`BdbQuit` exception if the :attr:`quitting <Bdb.set_quit>` flag is set (which can be set from :meth:`user_call`). Return a reference to ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
733ce935-c208-4031-abf3-6d05ecfd11ca
CPython Docs
file://datasets/cpython/Doc/library/bdb.rst
unknown
f3c3e3e8-7784-4211-ae88-c8fd31ad14af
38,179
supabase-export-v2
fe88d4c369b16591
The *arg* parameter depends on the previous event. See the documentation for :func:`sys.settrace` for more information on the trace function. For more information on code and frame objects, refer to :ref:`types`.
trusted_official_docs
CPython Docs
The *arg* parameter depends on the previous event. See the documentation for :func:`sys.settrace` for more information on the trace function. For more information on code and frame objects, refer to :ref:`types`.
The *arg* parameter depends on the previous event. See the documentation for :func:`sys.settrace` for more information on the trace function. For more information on code and frame objects, refer to :ref:`types`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
742c0a8d-afce-44b8-8086-8a3bb5d3786f
CPython Docs
file://datasets/cpython/Doc/library/bdb.rst
unknown
f3c3e3e8-7784-4211-ae88-c8fd31ad14af
38,157
supabase-export-v2
e5572b1ba6ec0f86
The :class:`Bdb` class acts as a generic Python debugger base class. This class takes care of the details of the trace facility; a derived class should implement user interaction. The standard debugger class (:class:`pdb.Pdb`) is an example.
trusted_official_docs
CPython Docs
The :class:`Bdb` class acts as a generic Python debugger base class. This class takes care of the details of the trace facility; a derived class should implement user interaction. The standard debugger class (:class:`pdb.Pdb`) is an example.
The :class:`Bdb` class acts as a generic Python debugger base class. This class takes care of the details of the trace facility; a derived class should implement user interaction. The standard debugger class (:class:`pdb.Pdb`) is an example.
python, official-docs, cpython, P0
Local_Trusted_Corpus
75b38ee3-ed87-41d3-b255-8d8f7469c885
CPython Docs
file://datasets/cpython/Doc/library/bdb.rst
unknown
f3c3e3e8-7784-4211-ae88-c8fd31ad14af
38,177
supabase-export-v2
1ceeb3e2a699ad64
be called, or another code block entered. * ``"return"``: A function or other code block is about to return. * ``"exception"``: An exception has occurred. For all the events, specialized functions (see below) are called.
trusted_official_docs
CPython Docs
be called, or another code block entered. * ``"return"``: A function or other code block is about to return. * ``"exception"``: An exception has occurred. For all the events, specialized functions (see below) are called.
be called, or another code block entered. * ``"return"``: A function or other code block is about to return. * ``"exception"``: An exception has occurred. For all the events, specialized functions (see below) are called.
python, official-docs, cpython, P0
Local_Trusted_Corpus
80ff65d1-1356-456c-8a7f-3dba4f7faadc
CPython Docs
file://datasets/cpython/Doc/library/bdb.rst
unknown
f3c3e3e8-7784-4211-ae88-c8fd31ad14af
38,121
supabase-export-v2
a90d42366e377d38
a breakpoint :attr:`hit <hits>` will be counted when the first line of that function is executed. A :attr:`conditional <cond>` breakpoint always counts a :attr:`hit <hits>`. :class:`Breakpoint` instances have the following methods:
trusted_official_docs
CPython Docs
a breakpoint :attr:`hit <hits>` will be counted when the first line of that function is executed. A :attr:`conditional <cond>` breakpoint always counts a :attr:`hit <hits>`. :class:`Breakpoint` instances have the following methods:
a breakpoint :attr:`hit <hits>` will be counted when the first line of that function is executed. A :attr:`conditional <cond>` breakpoint always counts a :attr:`hit <hits>`. :class:`Breakpoint` instances have the following methods:
python, official-docs, cpython, P0
Local_Trusted_Corpus
836436dc-2365-4445-81c6-0b744a3b3b98
CPython Docs
file://datasets/cpython/Doc/library/bdb.rst
unknown
f3c3e3e8-7784-4211-ae88-c8fd31ad14af
38,255
supabase-export-v2
95ffe1c88083aa8d
.. method:: restart_events() Restart all the disabled events. This function is automatically called in ``dispatch_*`` methods after ``user_*`` methods are called. If the ``dispatch_*`` methods are not overridden, the disabled events will be restarted after each user interaction.
trusted_official_docs
CPython Docs
.. method:: restart_events() Restart all the disabled events. This function is automatically called in ``dispatch_*`` methods after ``user_*`` methods are called. If the ``dispatch_*`` methods are not overridden, the disabled events will be restarted after each user interaction.
.. method:: restart_events() Restart all the disabled events. This function is automatically called in ``dispatch_*`` methods after ``user_*`` methods are called. If the ``dispatch_*`` methods are not overridden, the disabled events will be restarted after each user interaction.
python, official-docs, cpython, P0
Local_Trusted_Corpus
83d1608d-7a45-4dd0-87e9-d2bb1138b768
CPython Docs
file://datasets/cpython/Doc/library/bdb.rst
unknown
f3c3e3e8-7784-4211-ae88-c8fd31ad14af
38,280
supabase-export-v2
057186fa1a53a21b
that a temporary breakpoint should be deleted, is ``False`` only when the :attr:`cond <bdb.Breakpoint.cond>` cannot be evaluated (in which case, :attr:`ignore <bdb.Breakpoint.ignore>` count is ignored). If no such entry exists, then ``(None, None)`` is returned.
trusted_official_docs
CPython Docs
that a temporary breakpoint should be deleted, is ``False`` only when the :attr:`cond <bdb.Breakpoint.cond>` cannot be evaluated (in which case, :attr:`ignore <bdb.Breakpoint.ignore>` count is ignored). If no such entry exists, then ``(None, None)`` is returned.
that a temporary breakpoint should be deleted, is ``False`` only when the :attr:`cond <bdb.Breakpoint.cond>` cannot be evaluated (in which case, :attr:`ignore <bdb.Breakpoint.ignore>` count is ignored). If no such entry exists, then ``(None, None)`` is returned.
python, official-docs, cpython, P0
Local_Trusted_Corpus
87006c01-13ea-43ba-857e-f5a719682f56
CPython Docs
file://datasets/cpython/Doc/library/bdb.rst
unknown
f3c3e3e8-7784-4211-ae88-c8fd31ad14af
38,230
supabase-export-v2
4f7504e7973d8375
.. method:: set_break(filename, lineno, temporary=False, cond=None, funcname=None) Set a new breakpoint. If the *lineno* line doesn't exist for the *filename* passed as argument, return an error message. The *filename* should be in canonical form, as described in the :meth:`canonic` method.
trusted_official_docs
CPython Docs
.. method:: set_break(filename, lineno, temporary=False, cond=None, funcname=None) Set a new breakpoint. If the *lineno* line doesn't exist for the *filename* passed as argument, return an error message. The *filename* should be in canonical form, as described in the :meth:`canonic` method.
.. method:: set_break(filename, lineno, temporary=False, cond=None, funcname=None) Set a new breakpoint. If the *lineno* line doesn't exist for the *filename* passed as argument, return an error message. The *filename* should be in canonical form, as described in the :meth:`canonic` method.
python, official-docs, cpython, P0
Local_Trusted_Corpus
92de9b68-111e-41e8-9400-8292a703a849
CPython Docs
file://datasets/cpython/Doc/library/bdb.rst
unknown
f3c3e3e8-7784-4211-ae88-c8fd31ad14af
38,260
supabase-export-v2
46af86d6f5ac639b
Return a list of (frame, lineno) tuples in a stack trace, and a size. The most recently called frame is last in the list. The size is the number of frames below the frame where the debugger was invoked.
trusted_official_docs
CPython Docs
Return a list of (frame, lineno) tuples in a stack trace, and a size. The most recently called frame is last in the list. The size is the number of frames below the frame where the debugger was invoked.
Return a list of (frame, lineno) tuples in a stack trace, and a size. The most recently called frame is last in the list. The size is the number of frames below the frame where the debugger was invoked.
python, official-docs, cpython, P0
Local_Trusted_Corpus
9fcf7666-7b4b-4cff-a242-d299c811ef8c
CPython Docs
file://datasets/cpython/Doc/library/bdb.rst
unknown
f3c3e3e8-7784-4211-ae88-c8fd31ad14af
38,165
supabase-export-v2
4251914c1ff11587
Return canonical form of *filename*. For real file names, the canonical form is an operating-system-dependent, :func:`case-normalized <os.path.normcase>` :func:`absolute path <os.path.abspath>`. A *filename* with angle brackets, such as ``"<stdin>"`` generated in interactive mode, is returned unchanged.
trusted_official_docs
CPython Docs
Return canonical form of *filename*. For real file names, the canonical form is an operating-system-dependent, :func:`case-normalized <os.path.normcase>` :func:`absolute path <os.path.abspath>`. A *filename* with angle brackets, such as ``"<stdin>"`` generated in interactive mode, is returned unchanged.
Return canonical form of *filename*. For real file names, the canonical form is an operating-system-dependent, :func:`case-normalized <os.path.normcase>` :func:`absolute path <os.path.abspath>`. A *filename* with angle brackets, such as ``"<stdin>"`` generated in interactive mode, is returned unchanged.
python, official-docs, cpython, P0
Local_Trusted_Corpus
a40c6f14-f2a3-4d7b-b561-507686546c84
CPython Docs
file://datasets/cpython/Doc/library/bdb.rst
unknown
f3c3e3e8-7784-4211-ae88-c8fd31ad14af
38,119
supabase-export-v2
efb9d31e5d5e6e45
This class implements temporary breakpoints, ignore counts, disabling and (re-)enabling, and conditionals. Breakpoints are indexed by number through a list called :attr:`bpbynumber` and by ``(file, line)`` pairs through :attr:`bplist`. The former points to a single instance of class :class:`Breakpoint`. The latter po...
trusted_official_docs
CPython Docs
This class implements temporary breakpoints, ignore counts, disabling and (re-)enabling, and conditionals. Breakpoints are indexed by number through a list called :attr:`bpbynumber` and by ``(file, line)`` pairs through :attr:`bplist`. The former points to a single instance of class :class:`Breakpoint`. The latter po...
This class implements temporary breakpoints, ignore counts, disabling and (re-)enabling, and conditionals. Breakpoints are indexed by number through a list called :attr:`bpbynumber` and by ``(file, line)`` pairs through :attr:`bplist`. The former points to a single instance of class :class:`Breakpoint`. The latter po...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ae31db8e-4bcc-45de-a056-d177c0edea66
CPython Docs
file://datasets/cpython/Doc/library/bdb.rst
unknown
f3c3e3e8-7784-4211-ae88-c8fd31ad14af
38,263
supabase-export-v2
8a574825c8305171
Return a string with information about a stack entry, which is a ``(frame, lineno)`` tuple. The return string contains: * The canonical filename which contains the frame. * The function name or ``"<lambda>"``. * The input arguments. * The return value. * The line of code (if it exists).
trusted_official_docs
CPython Docs
Return a string with information about a stack entry, which is a ``(frame, lineno)`` tuple. The return string contains: * The canonical filename which contains the frame. * The function name or ``"<lambda>"``. * The input arguments. * The return value. * The line of code (if it exists).
Return a string with information about a stack entry, which is a ``(frame, lineno)`` tuple. The return string contains: * The canonical filename which contains the frame. * The function name or ``"<lambda>"``. * The input arguments. * The return value. * The line of code (if it exists).
python, official-docs, cpython, P0
Local_Trusted_Corpus
ba819c7b-347a-450f-af54-2464cea30453
CPython Docs
file://datasets/cpython/Doc/library/bdb.rst
unknown
f3c3e3e8-7784-4211-ae88-c8fd31ad14af
38,181
supabase-export-v2
b08866c0cb34e065
.. method:: dispatch_line(frame) If the debugger should stop on the current line, invoke the :meth:`user_line` method (which should be overridden in subclasses). Raise a :exc:`BdbQuit` exception if the :attr:`quitting <Bdb.set_quit>` flag is set (which can be set from :meth:`user_line`). Return a reference to the :m...
trusted_official_docs
CPython Docs
.. method:: dispatch_line(frame) If the debugger should stop on the current line, invoke the :meth:`user_line` method (which should be overridden in subclasses). Raise a :exc:`BdbQuit` exception if the :attr:`quitting <Bdb.set_quit>` flag is set (which can be set from :meth:`user_line`). Return a reference to the :m...
.. method:: dispatch_line(frame) If the debugger should stop on the current line, invoke the :meth:`user_line` method (which should be overridden in subclasses). Raise a :exc:`BdbQuit` exception if the :attr:`quitting <Bdb.set_quit>` flag is set (which can be set from :meth:`user_line`). Return a reference to the :m...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c53563b9-7d8a-4074-9a4c-71a7c206c0d9
CPython Docs
file://datasets/cpython/Doc/library/bdb.rst
unknown
f3c3e3e8-7784-4211-ae88-c8fd31ad14af
38,276
supabase-export-v2
77c1409d3ce00bf2
Return ``True`` if we should break here, depending on the way the :class:`Breakpoint` *b* was set. If it was set via line number, it checks if :attr:`b.line <bdb.Breakpoint.line>` is the same as the one in *frame*. If the breakpoint was set via :attr:`function name <bdb.Breakpoint.funcname>`, we have to check we are ...
trusted_official_docs
CPython Docs
Return ``True`` if we should break here, depending on the way the :class:`Breakpoint` *b* was set. If it was set via line number, it checks if :attr:`b.line <bdb.Breakpoint.line>` is the same as the one in *frame*. If the breakpoint was set via :attr:`function name <bdb.Breakpoint.funcname>`, we have to check we are ...
Return ``True`` if we should break here, depending on the way the :class:`Breakpoint` *b* was set. If it was set via line number, it checks if :attr:`b.line <bdb.Breakpoint.line>` is the same as the one in *frame*. If the breakpoint was set via :attr:`function name <bdb.Breakpoint.funcname>`, we have to check we are ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c5d6da2a-0c20-4b0a-a354-d2659dc7f766
CPython Docs
file://datasets/cpython/Doc/library/bdb.rst
unknown
f3c3e3e8-7784-4211-ae88-c8fd31ad14af
38,279
supabase-export-v2
0b97b91c7b78c6a7
Return ``(active breakpoint, delete temporary flag)`` or ``(None, None)`` as the breakpoint to act upon. The *active breakpoint* is the first entry in :attr:`bplist <bdb.Breakpoint.bplist>` for the (:attr:`file <bdb.Breakpoint.file>`, :attr:`line <bdb.Breakpoint.line>`) (which must exist) that is :attr:`enabled <bdb...
trusted_official_docs
CPython Docs
Return ``(active breakpoint, delete temporary flag)`` or ``(None, None)`` as the breakpoint to act upon. The *active breakpoint* is the first entry in :attr:`bplist <bdb.Breakpoint.bplist>` for the (:attr:`file <bdb.Breakpoint.file>`, :attr:`line <bdb.Breakpoint.line>`) (which must exist) that is :attr:`enabled <bdb...
Return ``(active breakpoint, delete temporary flag)`` or ``(None, None)`` as the breakpoint to act upon. The *active breakpoint* is the first entry in :attr:`bplist <bdb.Breakpoint.bplist>` for the (:attr:`file <bdb.Breakpoint.file>`, :attr:`line <bdb.Breakpoint.line>`) (which must exist) that is :attr:`enabled <bdb...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c8656bca-207d-459b-bd9d-7d87ffa40a23
CPython Docs
file://datasets/cpython/Doc/library/bdb.rst
unknown
f3c3e3e8-7784-4211-ae88-c8fd31ad14af
38,130
supabase-export-v2
f10b488b3cd24982
Return a string with all the information about the breakpoint, nicely formatted: * Breakpoint number. * Temporary status (del or keep). * File/line position. * Break condition. * Number of times to ignore. * Number of times hit.
trusted_official_docs
CPython Docs
Return a string with all the information about the breakpoint, nicely formatted: * Breakpoint number. * Temporary status (del or keep). * File/line position. * Break condition. * Number of times to ignore. * Number of times hit.
Return a string with all the information about the breakpoint, nicely formatted: * Breakpoint number. * Temporary status (del or keep). * File/line position. * Break condition. * Number of times to ignore. * Number of times hit.
python, official-docs, cpython, P0
Local_Trusted_Corpus
d2b448aa-c9dd-4ada-a1c3-f7e9bc6019e9
CPython Docs
file://datasets/cpython/Doc/library/bdb.rst
unknown
f3c3e3e8-7784-4211-ae88-c8fd31ad14af
38,187
supabase-export-v2
022310c3bf6765aa
.. method:: dispatch_exception(frame, arg) If the debugger should stop at this exception, invokes the :meth:`user_exception` method (which should be overridden in subclasses). Raise a :exc:`BdbQuit` exception if the :attr:`quitting <Bdb.set_quit>` flag is set (which can be set from :meth:`user_exception`). Return a r...
trusted_official_docs
CPython Docs
.. method:: dispatch_exception(frame, arg) If the debugger should stop at this exception, invokes the :meth:`user_exception` method (which should be overridden in subclasses). Raise a :exc:`BdbQuit` exception if the :attr:`quitting <Bdb.set_quit>` flag is set (which can be set from :meth:`user_exception`). Return a r...
.. method:: dispatch_exception(frame, arg) If the debugger should stop at this exception, invokes the :meth:`user_exception` method (which should be overridden in subclasses). Raise a :exc:`BdbQuit` exception if the :attr:`quitting <Bdb.set_quit>` flag is set (which can be set from :meth:`user_exception`). Return a r...
python, official-docs, cpython, P0
Local_Trusted_Corpus
db79d7f7-11c8-475c-94ac-b5ea583fd8d9
CPython Docs
file://datasets/cpython/Doc/library/bdb.rst
unknown
f3c3e3e8-7784-4211-ae88-c8fd31ad14af
38,185
supabase-export-v2
c7bc727d837df410
.. method:: dispatch_return(frame, arg) If the debugger should stop on this function return, invoke the :meth:`user_return` method (which should be overridden in subclasses). Raise a :exc:`BdbQuit` exception if the :attr:`quitting <Bdb.set_quit>` flag is set (which can be set from :meth:`user_return`). Return a refer...
trusted_official_docs
CPython Docs
.. method:: dispatch_return(frame, arg) If the debugger should stop on this function return, invoke the :meth:`user_return` method (which should be overridden in subclasses). Raise a :exc:`BdbQuit` exception if the :attr:`quitting <Bdb.set_quit>` flag is set (which can be set from :meth:`user_return`). Return a refer...
.. method:: dispatch_return(frame, arg) If the debugger should stop on this function return, invoke the :meth:`user_return` method (which should be overridden in subclasses). Raise a :exc:`BdbQuit` exception if the :attr:`quitting <Bdb.set_quit>` flag is set (which can be set from :meth:`user_return`). Return a refer...
python, official-docs, cpython, P0
Local_Trusted_Corpus
faed7f81-8089-4c05-ad10-8ad0f43c1edc
CPython Docs
file://datasets/cpython/Doc/library/bdb.rst
unknown
f3c3e3e8-7784-4211-ae88-c8fd31ad14af
38,120
supabase-export-v2
c596494a6613b126
a single instance of class :class:`Breakpoint`. The latter points to a list of such instances since there may be more than one breakpoint per line. When creating a breakpoint, its associated :attr:`file name <file>` should be in canonical form. If a :attr:`funcname` is defined, a breakpoint :attr:`hit <hits>` will be...
trusted_official_docs
CPython Docs
a single instance of class :class:`Breakpoint`. The latter points to a list of such instances since there may be more than one breakpoint per line. When creating a breakpoint, its associated :attr:`file name <file>` should be in canonical form. If a :attr:`funcname` is defined, a breakpoint :attr:`hit <hits>` will be...
a single instance of class :class:`Breakpoint`. The latter points to a list of such instances since there may be more than one breakpoint per line. When creating a breakpoint, its associated :attr:`file name <file>` should be in canonical form. If a :attr:`funcname` is defined, a breakpoint :attr:`hit <hits>` will be...
python, official-docs, cpython, P0
Local_Trusted_Corpus
fb8cc990-7f87-4b15-b2e6-8a3c3fffc005
CPython Docs
file://datasets/cpython/Doc/library/bdb.rst
unknown
f3c3e3e8-7784-4211-ae88-c8fd31ad14af
38,264
supabase-export-v2
d34d67d8f4b16c30
contains the frame. * The function name or ``"<lambda>"``. * The input arguments. * The return value. * The line of code (if it exists). The following two methods can be called by clients to use a debugger to debug a :term:`statement`, given as a string.
trusted_official_docs
CPython Docs
contains the frame. * The function name or ``"<lambda>"``. * The input arguments. * The return value. * The line of code (if it exists). The following two methods can be called by clients to use a debugger to debug a :term:`statement`, given as a string.
contains the frame. * The function name or ``"<lambda>"``. * The input arguments. * The return value. * The line of code (if it exists). The following two methods can be called by clients to use a debugger to debug a :term:`statement`, given as a string.
python, official-docs, cpython, P0
Local_Trusted_Corpus
ffcfc036-c969-4b86-8c86-6ad73d18718c
CPython Docs
file://datasets/cpython/Doc/library/bdb.rst
unknown
f3c3e3e8-7784-4211-ae88-c8fd31ad14af
38,188
supabase-export-v2
cc4896c4daae2b7a
the :attr:`quitting <Bdb.set_quit>` flag is set (which can be set from :meth:`user_exception`). Return a reference to the :meth:`trace_dispatch` method for further tracing in that scope. Normally derived classes don't override the following methods, but they may if they want to redefine the definition of stopping and ...
trusted_official_docs
CPython Docs
the :attr:`quitting <Bdb.set_quit>` flag is set (which can be set from :meth:`user_exception`). Return a reference to the :meth:`trace_dispatch` method for further tracing in that scope. Normally derived classes don't override the following methods, but they may if they want to redefine the definition of stopping and ...
the :attr:`quitting <Bdb.set_quit>` flag is set (which can be set from :meth:`user_exception`). Return a reference to the :meth:`trace_dispatch` method for further tracing in that scope. Normally derived classes don't override the following methods, but they may if they want to redefine the definition of stopping and ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
6f302c45-8e62-458a-b44d-d1e5854f7810
CPython Docs
file://datasets/cpython/Doc/library/tkinter.colorchooser.rst
unknown
fa86f50d-e4b0-49a5-8a69-4b19137b9222
38,287
supabase-export-v2
d98a294fccaa15fd
-------------- The :mod:`!tkinter.colorchooser` module provides the :class:`Chooser` class as an interface to the native color picker dialog. ``Chooser`` implements a modal color choosing dialog window. The ``Chooser`` class inherits from the :class:`~tkinter.commondialog.Dialog` class.
trusted_official_docs
CPython Docs
-------------- The :mod:`!tkinter.colorchooser` module provides the :class:`Chooser` class as an interface to the native color picker dialog. ``Chooser`` implements a modal color choosing dialog window. The ``Chooser`` class inherits from the :class:`~tkinter.commondialog.Dialog` class.
-------------- The :mod:`!tkinter.colorchooser` module provides the :class:`Chooser` class as an interface to the native color picker dialog. ``Chooser`` implements a modal color choosing dialog window. The ``Chooser`` class inherits from the :class:`~tkinter.commondialog.Dialog` class.
python, official-docs, cpython, P0
Local_Trusted_Corpus
7c04267f-5663-4340-a5e3-fc4466c6bf4d
CPython Docs
file://datasets/cpython/Doc/library/tkinter.colorchooser.rst
unknown
fa86f50d-e4b0-49a5-8a69-4b19137b9222
38,290
supabase-export-v2
90d8a306ac3b81b2
.. function:: askcolor(color=None, **options) Create a color choosing dialog. A call to this method will show the window, wait for the user to make a selection, and return the selected color (or ``None``) to the caller.
trusted_official_docs
CPython Docs
.. function:: askcolor(color=None, **options) Create a color choosing dialog. A call to this method will show the window, wait for the user to make a selection, and return the selected color (or ``None``) to the caller.
.. function:: askcolor(color=None, **options) Create a color choosing dialog. A call to this method will show the window, wait for the user to make a selection, and return the selected color (or ``None``) to the caller.
python, official-docs, cpython, P0
Local_Trusted_Corpus
03e035c6-1b99-4430-8606-0474f6a1a234
CPython Docs
file://datasets/cpython/Doc/library/devmode.rst
unknown
7d80fe8a-8cdd-49c0-82ad-699db8b8b00e
38,321
supabase-export-v2
e0b4ae49ea95f840
* Enable :ref:`asyncio debug mode <asyncio-debug-mode>`. For example, :mod:`asyncio` checks for coroutines that were not awaited and logs them. It behaves as if the :envvar:`PYTHONASYNCIODEBUG` environment variable is set to ``1``.
trusted_official_docs
CPython Docs
* Enable :ref:`asyncio debug mode <asyncio-debug-mode>`. For example, :mod:`asyncio` checks for coroutines that were not awaited and logs them. It behaves as if the :envvar:`PYTHONASYNCIODEBUG` environment variable is set to ``1``.
* Enable :ref:`asyncio debug mode <asyncio-debug-mode>`. For example, :mod:`asyncio` checks for coroutines that were not awaited and logs them. It behaves as if the :envvar:`PYTHONASYNCIODEBUG` environment variable is set to ``1``.
python, official-docs, cpython, P0
Local_Trusted_Corpus
0ae2ac23-8e6a-4940-b50a-fc8bba2aa7a1
CPython Docs
file://datasets/cpython/Doc/library/devmode.rst
unknown
7d80fe8a-8cdd-49c0-82ad-699db8b8b00e
38,358
supabase-export-v2
c090caf4683e806e
Exception ignored in: <_io.TextIOWrapper name='script.py' mode='r' encoding='UTF-8'> Traceback (most recent call last): File "script.py", line 10, in <module> main() OSError: [Errno 9] Bad file descriptor ``os.close(fp.fileno())`` closes the file descriptor. When the file object finalizer tries to close the file descri...
trusted_official_docs
CPython Docs
Exception ignored in: <_io.TextIOWrapper name='script.py' mode='r' encoding='UTF-8'> Traceback (most recent call last): File "script.py", line 10, in <module> main() OSError: [Errno 9] Bad file descriptor ``os.close(fp.fileno())`` closes the file descriptor. When the file object finalizer tries to close the file descri...
Exception ignored in: <_io.TextIOWrapper name='script.py' mode='r' encoding='UTF-8'> Traceback (most recent call last): File "script.py", line 10, in <module> main() OSError: [Errno 9] Bad file descriptor ``os.close(fp.fileno())`` closes the file descriptor. When the file object finalizer tries to close the file descri...
python, official-docs, cpython, P0
Local_Trusted_Corpus
10db3ff6-5f3c-4867-a6ac-0168aafbe48b
CPython Docs
file://datasets/cpython/Doc/library/devmode.rst
unknown
7d80fe8a-8cdd-49c0-82ad-699db8b8b00e
38,347
supabase-export-v2
5248c108ef26c1a8
exiting Python. It is bad in CPython, but it is even worse in PyPy. Closing resources explicitly makes an application more deterministic and more reliable. Bad file descriptor error example ---------------------------------
trusted_official_docs
CPython Docs
exiting Python. It is bad in CPython, but it is even worse in PyPy. Closing resources explicitly makes an application more deterministic and more reliable. Bad file descriptor error example ---------------------------------
exiting Python. It is bad in CPython, but it is even worse in PyPy. Closing resources explicitly makes an application more deterministic and more reliable. Bad file descriptor error example ---------------------------------
python, official-docs, cpython, P0
Local_Trusted_Corpus
27a5210e-120b-4e59-847e-76fe2026f489
CPython Docs
file://datasets/cpython/Doc/library/devmode.rst
unknown
7d80fe8a-8cdd-49c0-82ad-699db8b8b00e
38,327
supabase-export-v2
097a0e665f23134e
The Python Development Mode does not prevent the :option:`-O` command line option from removing :keyword:`assert` statements nor from setting :const:`__debug__` to ``False``. The Python Development Mode can only be enabled at the Python startup. Its value can be read from :data:`sys.flags.dev_mode <sys.flags>`.
trusted_official_docs
CPython Docs
The Python Development Mode does not prevent the :option:`-O` command line option from removing :keyword:`assert` statements nor from setting :const:`__debug__` to ``False``. The Python Development Mode can only be enabled at the Python startup. Its value can be read from :data:`sys.flags.dev_mode <sys.flags>`.
The Python Development Mode does not prevent the :option:`-O` command line option from removing :keyword:`assert` statements nor from setting :const:`__debug__` to ``False``. The Python Development Mode can only be enabled at the Python startup. Its value can be read from :data:`sys.flags.dev_mode <sys.flags>`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
292ab5ce-2a4a-414a-ba81-bb49bb3f33ee
CPython Docs
file://datasets/cpython/Doc/library/devmode.rst
unknown
7d80fe8a-8cdd-49c0-82ad-699db8b8b00e
38,312
supabase-export-v2
794ea50250a3de9f
It behaves as if the :option:`-W default <-W>` command line option is used. Use the :option:`-W error <-W>` command line option or set the :envvar:`PYTHONWARNINGS` environment variable to ``error`` to treat warnings as errors.
trusted_official_docs
CPython Docs
It behaves as if the :option:`-W default <-W>` command line option is used. Use the :option:`-W error <-W>` command line option or set the :envvar:`PYTHONWARNINGS` environment variable to ``error`` to treat warnings as errors.
It behaves as if the :option:`-W default <-W>` command line option is used. Use the :option:`-W error <-W>` command line option or set the :envvar:`PYTHONWARNINGS` environment variable to ``error`` to treat warnings as errors.
python, official-docs, cpython, P0
Local_Trusted_Corpus
3b05adfb-0faa-47d6-af6a-c6ff61790d57
CPython Docs
file://datasets/cpython/Doc/library/devmode.rst
unknown
7d80fe8a-8cdd-49c0-82ad-699db8b8b00e
38,341
supabase-export-v2
659ffa16092ef103
$ python -X dev script.py README.txt 269 script.py:10: ResourceWarning: unclosed file <_io.TextIOWrapper name='README.rst' mode='r' encoding='UTF-8'> main() ResourceWarning: Enable tracemalloc to get the object allocation traceback In addition, enabling :mod:`tracemalloc` shows the line where the file was opened:
trusted_official_docs
CPython Docs
$ python -X dev script.py README.txt 269 script.py:10: ResourceWarning: unclosed file <_io.TextIOWrapper name='README.rst' mode='r' encoding='UTF-8'> main() ResourceWarning: Enable tracemalloc to get the object allocation traceback In addition, enabling :mod:`tracemalloc` shows the line where the file was opened:
$ python -X dev script.py README.txt 269 script.py:10: ResourceWarning: unclosed file <_io.TextIOWrapper name='README.rst' mode='r' encoding='UTF-8'> main() ResourceWarning: Enable tracemalloc to get the object allocation traceback In addition, enabling :mod:`tracemalloc` shows the line where the file was opened:
python, official-docs, cpython, P0
Local_Trusted_Corpus
453e999a-cacf-4fc7-9a71-250610f6e44f
CPython Docs
file://datasets/cpython/Doc/library/devmode.rst
unknown
7d80fe8a-8cdd-49c0-82ad-699db8b8b00e
38,313
supabase-export-v2
2da45b4649317e78
Use the :option:`-W error <-W>` command line option or set the :envvar:`PYTHONWARNINGS` environment variable to ``error`` to treat warnings as errors. * Install debug hooks on memory allocators to check for:
trusted_official_docs
CPython Docs
Use the :option:`-W error <-W>` command line option or set the :envvar:`PYTHONWARNINGS` environment variable to ``error`` to treat warnings as errors. * Install debug hooks on memory allocators to check for:
Use the :option:`-W error <-W>` command line option or set the :envvar:`PYTHONWARNINGS` environment variable to ``error`` to treat warnings as errors. * Install debug hooks on memory allocators to check for:
python, official-docs, cpython, P0
Local_Trusted_Corpus
51e58d47-5d11-4f32-ba00-b0baec425a6d
CPython Docs
file://datasets/cpython/Doc/library/devmode.rst
unknown
7d80fe8a-8cdd-49c0-82ad-699db8b8b00e
38,301
supabase-export-v2
4612a63799c3b7db
.. versionadded:: 3.7 The Python Development Mode introduces additional runtime checks that are too expensive to be enabled by default. It should not be more verbose than the default if the code is correct; new warnings are only emitted when an issue is detected.
trusted_official_docs
CPython Docs
.. versionadded:: 3.7 The Python Development Mode introduces additional runtime checks that are too expensive to be enabled by default. It should not be more verbose than the default if the code is correct; new warnings are only emitted when an issue is detected.
.. versionadded:: 3.7 The Python Development Mode introduces additional runtime checks that are too expensive to be enabled by default. It should not be more verbose than the default if the code is correct; new warnings are only emitted when an issue is detected.
python, official-docs, cpython, P0
Local_Trusted_Corpus
55378fba-d84b-4639-8e37-0c96599731f9
CPython Docs
file://datasets/cpython/Doc/library/devmode.rst
unknown
7d80fe8a-8cdd-49c0-82ad-699db8b8b00e
38,324
supabase-export-v2
581cd991237a240c
default, for best performance, the *errors* argument is only checked at the first encoding/decoding error and the *encoding* argument is sometimes ignored for empty strings. * The :class:`io.IOBase` destructor logs ``close()`` exceptions. * Set the :attr:`~sys.flags.dev_mode` attribute of :data:`sys.flags` to ``True``...
trusted_official_docs
CPython Docs
default, for best performance, the *errors* argument is only checked at the first encoding/decoding error and the *encoding* argument is sometimes ignored for empty strings. * The :class:`io.IOBase` destructor logs ``close()`` exceptions. * Set the :attr:`~sys.flags.dev_mode` attribute of :data:`sys.flags` to ``True``...
default, for best performance, the *errors* argument is only checked at the first encoding/decoding error and the *encoding* argument is sometimes ignored for empty strings. * The :class:`io.IOBase` destructor logs ``close()`` exceptions. * Set the :attr:`~sys.flags.dev_mode` attribute of :data:`sys.flags` to ``True``...
python, official-docs, cpython, P0
Local_Trusted_Corpus
57fbe84d-b118-4fac-b5db-caa9b76a0afb
CPython Docs
file://datasets/cpython/Doc/library/devmode.rst
unknown
7d80fe8a-8cdd-49c0-82ad-699db8b8b00e
38,357
supabase-export-v2
50f720b1ae2a85be
.. code-block:: shell-session $ python -X dev script.py import os script.py:10: ResourceWarning: unclosed file <_io.TextIOWrapper name='script.py' mode='r' encoding='UTF-8'> main() ResourceWarning: Enable tracemalloc to get the object allocation traceback Exception ignored in: <_io.TextIOWrapper name='script.py' m...
trusted_official_docs
CPython Docs
.. code-block:: shell-session $ python -X dev script.py import os script.py:10: ResourceWarning: unclosed file <_io.TextIOWrapper name='script.py' mode='r' encoding='UTF-8'> main() ResourceWarning: Enable tracemalloc to get the object allocation traceback Exception ignored in: <_io.TextIOWrapper name='script.py' m...
.. code-block:: shell-session $ python -X dev script.py import os script.py:10: ResourceWarning: unclosed file <_io.TextIOWrapper name='script.py' mode='r' encoding='UTF-8'> main() ResourceWarning: Enable tracemalloc to get the object allocation traceback Exception ignored in: <_io.TextIOWrapper name='script.py' m...
python, official-docs, cpython, P0
Local_Trusted_Corpus
5ae593b9-2e1d-48f1-a677-3b2c2bbb427b
CPython Docs
file://datasets/cpython/Doc/library/devmode.rst
unknown
7d80fe8a-8cdd-49c0-82ad-699db8b8b00e
38,326
supabase-export-v2
a0dd19fb5c60b309
For example, :exc:`ResourceWarning` logs the traceback where the resource was allocated, and a buffer overflow error logs the traceback where the memory block was allocated. The Python Development Mode does not prevent the :option:`-O` command line option from removing :keyword:`assert` statements nor from setting :con...
trusted_official_docs
CPython Docs
For example, :exc:`ResourceWarning` logs the traceback where the resource was allocated, and a buffer overflow error logs the traceback where the memory block was allocated. The Python Development Mode does not prevent the :option:`-O` command line option from removing :keyword:`assert` statements nor from setting :con...
For example, :exc:`ResourceWarning` logs the traceback where the resource was allocated, and a buffer overflow error logs the traceback where the memory block was allocated. The Python Development Mode does not prevent the :option:`-O` command line option from removing :keyword:`assert` statements nor from setting :con...
python, official-docs, cpython, P0
Local_Trusted_Corpus
60b7447c-8710-4411-85b7-97486e462553
CPython Docs
file://datasets/cpython/Doc/library/devmode.rst
unknown
7d80fe8a-8cdd-49c0-82ad-699db8b8b00e
38,317
supabase-export-v2
4e3c109dedd62d2b
It behaves as if the :envvar:`PYTHONMALLOC` environment variable is set to ``debug``. To enable the Python Development Mode without installing debug hooks on memory allocators, set the :envvar:`PYTHONMALLOC` environment variable to ``default``.
trusted_official_docs
CPython Docs
It behaves as if the :envvar:`PYTHONMALLOC` environment variable is set to ``debug``. To enable the Python Development Mode without installing debug hooks on memory allocators, set the :envvar:`PYTHONMALLOC` environment variable to ``default``.
It behaves as if the :envvar:`PYTHONMALLOC` environment variable is set to ``debug``. To enable the Python Development Mode without installing debug hooks on memory allocators, set the :envvar:`PYTHONMALLOC` environment variable to ``default``.
python, official-docs, cpython, P0
Local_Trusted_Corpus
63213fb8-136a-4d32-ae88-0d9999213cc2
CPython Docs
file://datasets/cpython/Doc/library/devmode.rst
unknown
7d80fe8a-8cdd-49c0-82ad-699db8b8b00e
38,346
supabase-export-v2
691b1570971fb324
def main(): # Close the file explicitly when exiting the with block with open(sys.argv[1]) as fp: nlines = len(fp.readlines()) print(nlines) Not closing a resource explicitly can leave a resource open for way longer than expected; it can cause severe issues upon exiting Python. It is bad in CPython, but it is even wors...
trusted_official_docs
CPython Docs
def main(): # Close the file explicitly when exiting the with block with open(sys.argv[1]) as fp: nlines = len(fp.readlines()) print(nlines) Not closing a resource explicitly can leave a resource open for way longer than expected; it can cause severe issues upon exiting Python. It is bad in CPython, but it is even wors...
def main(): # Close the file explicitly when exiting the with block with open(sys.argv[1]) as fp: nlines = len(fp.readlines()) print(nlines) Not closing a resource explicitly can leave a resource open for way longer than expected; it can cause severe issues upon exiting Python. It is bad in CPython, but it is even wors...
python, official-docs, cpython, P0
Local_Trusted_Corpus
6fbd72e7-f24f-4736-806c-7bfd13647715
CPython Docs
file://datasets/cpython/Doc/library/devmode.rst
unknown
7d80fe8a-8cdd-49c0-82ad-699db8b8b00e
38,345
supabase-export-v2
298b40c10b112c28
The fix is to close explicitly the file. Example using a context manager:: def main(): # Close the file explicitly when exiting the with block with open(sys.argv[1]) as fp: nlines = len(fp.readlines()) print(nlines)
trusted_official_docs
CPython Docs
The fix is to close explicitly the file. Example using a context manager:: def main(): # Close the file explicitly when exiting the with block with open(sys.argv[1]) as fp: nlines = len(fp.readlines()) print(nlines)
The fix is to close explicitly the file. Example using a context manager:: def main(): # Close the file explicitly when exiting the with block with open(sys.argv[1]) as fp: nlines = len(fp.readlines()) print(nlines)
python, official-docs, cpython, P0
Local_Trusted_Corpus
74a0949a-98c7-4264-95c0-f80474813e3b
CPython Docs
file://datasets/cpython/Doc/library/devmode.rst
unknown
7d80fe8a-8cdd-49c0-82ad-699db8b8b00e
38,322
supabase-export-v2
1ed3cac24e52e053
It behaves as if the :envvar:`PYTHONASYNCIODEBUG` environment variable is set to ``1``. * Check the *encoding* and *errors* arguments for string encoding and decoding operations. Examples: :func:`open`, :meth:`str.encode` and :meth:`bytes.decode`.
trusted_official_docs
CPython Docs
It behaves as if the :envvar:`PYTHONASYNCIODEBUG` environment variable is set to ``1``. * Check the *encoding* and *errors* arguments for string encoding and decoding operations. Examples: :func:`open`, :meth:`str.encode` and :meth:`bytes.decode`.
It behaves as if the :envvar:`PYTHONASYNCIODEBUG` environment variable is set to ``1``. * Check the *encoding* and *errors* arguments for string encoding and decoding operations. Examples: :func:`open`, :meth:`str.encode` and :meth:`bytes.decode`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
9217c1bd-d0bf-49e0-bf33-b342b9f05e04
CPython Docs
file://datasets/cpython/Doc/library/devmode.rst
unknown
7d80fe8a-8cdd-49c0-82ad-699db8b8b00e
38,328
supabase-export-v2
3dda5c19c46cb413
The Python Development Mode can only be enabled at the Python startup. Its value can be read from :data:`sys.flags.dev_mode <sys.flags>`. .. versionchanged:: 3.8 The :class:`io.IOBase` destructor now logs ``close()`` exceptions.
trusted_official_docs
CPython Docs
The Python Development Mode can only be enabled at the Python startup. Its value can be read from :data:`sys.flags.dev_mode <sys.flags>`. .. versionchanged:: 3.8 The :class:`io.IOBase` destructor now logs ``close()`` exceptions.
The Python Development Mode can only be enabled at the Python startup. Its value can be read from :data:`sys.flags.dev_mode <sys.flags>`. .. versionchanged:: 3.8 The :class:`io.IOBase` destructor now logs ``close()`` exceptions.
python, official-docs, cpython, P0
Local_Trusted_Corpus
92327eb8-6a34-4453-a06d-e21ffac121eb
CPython Docs
file://datasets/cpython/Doc/library/devmode.rst
unknown
7d80fe8a-8cdd-49c0-82ad-699db8b8b00e
38,302
supabase-export-v2
bd1ff003f08cf857
default. It should not be more verbose than the default if the code is correct; new warnings are only emitted when an issue is detected. It can be enabled using the :option:`-X dev <-X>` command line option or by setting the :envvar:`PYTHONDEVMODE` environment variable to ``1``.
trusted_official_docs
CPython Docs
default. It should not be more verbose than the default if the code is correct; new warnings are only emitted when an issue is detected. It can be enabled using the :option:`-X dev <-X>` command line option or by setting the :envvar:`PYTHONDEVMODE` environment variable to ``1``.
default. It should not be more verbose than the default if the code is correct; new warnings are only emitted when an issue is detected. It can be enabled using the :option:`-X dev <-X>` command line option or by setting the :envvar:`PYTHONDEVMODE` environment variable to ``1``.
python, official-docs, cpython, P0
Local_Trusted_Corpus
9a9cf9dd-3f20-43c0-a44e-4ce5a9fe2799
CPython Docs
file://datasets/cpython/Doc/library/devmode.rst
unknown
7d80fe8a-8cdd-49c0-82ad-699db8b8b00e
38,359
supabase-export-v2
f619021f24f9a863
file descriptor must be closed only once. In the worst case scenario, closing it twice can lead to a crash (see :issue:`18748` for an example). The fix is to remove the ``os.close(fp.fileno())`` line, or open the file with ``closefd=False``.
trusted_official_docs
CPython Docs
file descriptor must be closed only once. In the worst case scenario, closing it twice can lead to a crash (see :issue:`18748` for an example). The fix is to remove the ``os.close(fp.fileno())`` line, or open the file with ``closefd=False``.
file descriptor must be closed only once. In the worst case scenario, closing it twice can lead to a crash (see :issue:`18748` for an example). The fix is to remove the ``os.close(fp.fileno())`` line, or open the file with ``closefd=False``.
python, official-docs, cpython, P0
Local_Trusted_Corpus
a3315876-2b05-4093-82ab-67e5856e9e84
CPython Docs
file://datasets/cpython/Doc/library/devmode.rst
unknown
7d80fe8a-8cdd-49c0-82ad-699db8b8b00e
38,344
supabase-export-v2
7b1031da36620411
file <_io.TextIOWrapper name='README.rst' mode='r' encoding='UTF-8'> main() Object allocated at (most recent call last): File "script.py", lineno 10 main() File "script.py", lineno 4 fp = open(sys.argv[1]) The fix is to close explicitly the file. Example using a context manager::
trusted_official_docs
CPython Docs
file <_io.TextIOWrapper name='README.rst' mode='r' encoding='UTF-8'> main() Object allocated at (most recent call last): File "script.py", lineno 10 main() File "script.py", lineno 4 fp = open(sys.argv[1]) The fix is to close explicitly the file. Example using a context manager::
file <_io.TextIOWrapper name='README.rst' mode='r' encoding='UTF-8'> main() Object allocated at (most recent call last): File "script.py", lineno 10 main() File "script.py", lineno 4 fp = open(sys.argv[1]) The fix is to close explicitly the file. Example using a context manager::
python, official-docs, cpython, P0
Local_Trusted_Corpus
a718c627-348b-4a0b-9b10-bc7cf66919d8
CPython Docs
file://datasets/cpython/Doc/library/devmode.rst
unknown
7d80fe8a-8cdd-49c0-82ad-699db8b8b00e
38,325
supabase-export-v2
c7c536f5af4d5858
* The :class:`io.IOBase` destructor logs ``close()`` exceptions. * Set the :attr:`~sys.flags.dev_mode` attribute of :data:`sys.flags` to ``True``. The Python Development Mode does not enable the :mod:`tracemalloc` module by default, because the overhead cost (to performance and memory) would be too large. Enabling the ...
trusted_official_docs
CPython Docs
* The :class:`io.IOBase` destructor logs ``close()`` exceptions. * Set the :attr:`~sys.flags.dev_mode` attribute of :data:`sys.flags` to ``True``. The Python Development Mode does not enable the :mod:`tracemalloc` module by default, because the overhead cost (to performance and memory) would be too large. Enabling the ...
* The :class:`io.IOBase` destructor logs ``close()`` exceptions. * Set the :attr:`~sys.flags.dev_mode` attribute of :data:`sys.flags` to ``True``. The Python Development Mode does not enable the :mod:`tracemalloc` module by default, because the overhead cost (to performance and memory) would be too large. Enabling the ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c3e7c13b-414e-4690-88ab-a114d0bcf54b
CPython Docs
file://datasets/cpython/Doc/library/devmode.rst
unknown
7d80fe8a-8cdd-49c0-82ad-699db8b8b00e
38,318
supabase-export-v2
f79507a4b7615fab
To enable the Python Development Mode without installing debug hooks on memory allocators, set the :envvar:`PYTHONMALLOC` environment variable to ``default``. * Call :func:`faulthandler.enable` at Python startup to install handlers for the :const:`~signal.SIGSEGV`, :const:`~signal.SIGFPE`, :const:`~signal.SIGABRT`, :...
trusted_official_docs
CPython Docs
To enable the Python Development Mode without installing debug hooks on memory allocators, set the :envvar:`PYTHONMALLOC` environment variable to ``default``. * Call :func:`faulthandler.enable` at Python startup to install handlers for the :const:`~signal.SIGSEGV`, :const:`~signal.SIGFPE`, :const:`~signal.SIGABRT`, :...
To enable the Python Development Mode without installing debug hooks on memory allocators, set the :envvar:`PYTHONMALLOC` environment variable to ``default``. * Call :func:`faulthandler.enable` at Python startup to install handlers for the :const:`~signal.SIGSEGV`, :const:`~signal.SIGFPE`, :const:`~signal.SIGABRT`, :...
python, official-docs, cpython, P0
Local_Trusted_Corpus
dfc349cf-b66a-45aa-aaa1-77c0d7446ac3
CPython Docs
file://datasets/cpython/Doc/library/devmode.rst
unknown
7d80fe8a-8cdd-49c0-82ad-699db8b8b00e
38,323
supabase-export-v2
61029ef8c1e88620
* Check the *encoding* and *errors* arguments for string encoding and decoding operations. Examples: :func:`open`, :meth:`str.encode` and :meth:`bytes.decode`. By default, for best performance, the *errors* argument is only checked at the first encoding/decoding error and the *encoding* argument is sometimes ignored ...
trusted_official_docs
CPython Docs
* Check the *encoding* and *errors* arguments for string encoding and decoding operations. Examples: :func:`open`, :meth:`str.encode` and :meth:`bytes.decode`. By default, for best performance, the *errors* argument is only checked at the first encoding/decoding error and the *encoding* argument is sometimes ignored ...
* Check the *encoding* and *errors* arguments for string encoding and decoding operations. Examples: :func:`open`, :meth:`str.encode` and :meth:`bytes.decode`. By default, for best performance, the *errors* argument is only checked at the first encoding/decoding error and the *encoding* argument is sometimes ignored ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e953cab6-6307-4630-bfeb-801eef8b4449
CPython Docs
file://datasets/cpython/Doc/library/devmode.rst
unknown
7d80fe8a-8cdd-49c0-82ad-699db8b8b00e
38,319
supabase-export-v2
f6eb75e6c34e8b50
Call :func:`faulthandler.enable` at Python startup to install handlers for the :const:`~signal.SIGSEGV`, :const:`~signal.SIGFPE`, :const:`~signal.SIGABRT`, :const:`~signal.SIGBUS` and :const:`~signal.SIGILL` signals to dump the Python traceback on a crash. It behaves as if the :option:`-X faulthandler <-X>` command lin...
trusted_official_docs
CPython Docs
Call :func:`faulthandler.enable` at Python startup to install handlers for the :const:`~signal.SIGSEGV`, :const:`~signal.SIGFPE`, :const:`~signal.SIGABRT`, :const:`~signal.SIGBUS` and :const:`~signal.SIGILL` signals to dump the Python traceback on a crash. It behaves as if the :option:`-X faulthandler <-X>` command lin...
Call :func:`faulthandler.enable` at Python startup to install handlers for the :const:`~signal.SIGSEGV`, :const:`~signal.SIGFPE`, :const:`~signal.SIGABRT`, :const:`~signal.SIGBUS` and :const:`~signal.SIGILL` signals to dump the Python traceback on a crash. It behaves as if the :option:`-X faulthandler <-X>` command lin...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ee851815-e875-43d5-b9be-d0164825fa5a
CPython Docs
file://datasets/cpython/Doc/library/devmode.rst
unknown
7d80fe8a-8cdd-49c0-82ad-699db8b8b00e
38,320
supabase-export-v2
c062e5ff38a3a61a
It behaves as if the :option:`-X faulthandler <-X>` command line option is used or if the :envvar:`PYTHONFAULTHANDLER` environment variable is set to ``1``. * Enable :ref:`asyncio debug mode <asyncio-debug-mode>`. For example, :mod:`asyncio` checks for coroutines that were not awaited and logs them.
trusted_official_docs
CPython Docs
It behaves as if the :option:`-X faulthandler <-X>` command line option is used or if the :envvar:`PYTHONFAULTHANDLER` environment variable is set to ``1``. * Enable :ref:`asyncio debug mode <asyncio-debug-mode>`. For example, :mod:`asyncio` checks for coroutines that were not awaited and logs them.
It behaves as if the :option:`-X faulthandler <-X>` command line option is used or if the :envvar:`PYTHONFAULTHANDLER` environment variable is set to ``1``. * Enable :ref:`asyncio debug mode <asyncio-debug-mode>`. For example, :mod:`asyncio` checks for coroutines that were not awaited and logs them.
python, official-docs, cpython, P0
Local_Trusted_Corpus
fcdf6ae2-4899-4f95-821a-cc5f0c5d5a85
CPython Docs
file://datasets/cpython/Doc/library/devmode.rst
unknown
7d80fe8a-8cdd-49c0-82ad-699db8b8b00e
38,343
supabase-export-v2
a68ecb32df5802c5
.. code-block:: shell-session $ python -X dev -X tracemalloc=5 script.py README.rst 269 script.py:10: ResourceWarning: unclosed file <_io.TextIOWrapper name='README.rst' mode='r' encoding='UTF-8'> main() Object allocated at (most recent call last): File "script.py", lineno 10 main() File "script.py", lineno 4 f...
trusted_official_docs
CPython Docs
.. code-block:: shell-session $ python -X dev -X tracemalloc=5 script.py README.rst 269 script.py:10: ResourceWarning: unclosed file <_io.TextIOWrapper name='README.rst' mode='r' encoding='UTF-8'> main() Object allocated at (most recent call last): File "script.py", lineno 10 main() File "script.py", lineno 4 f...
.. code-block:: shell-session $ python -X dev -X tracemalloc=5 script.py README.rst 269 script.py:10: ResourceWarning: unclosed file <_io.TextIOWrapper name='README.rst' mode='r' encoding='UTF-8'> main() Object allocated at (most recent call last): File "script.py", lineno 10 main() File "script.py", lineno 4 f...
python, official-docs, cpython, P0
Local_Trusted_Corpus
0200019b-303a-4df6-a80e-ec3275f35ae6
CPython Docs
file://datasets/cpython/Doc/library/__future__.rst
unknown
1f3db80e-37a2-4603-b741-b4099488c436
38,366
supabase-export-v2
3a234c6e4c816f8b
and the :mod:`!__future__` exists and is handled by the import system the same way any other Python module would be. This design serves three purposes: * To avoid confusing existing tools that analyze import statements and expect to find the modules they're importing.
trusted_official_docs
CPython Docs
and the :mod:`!__future__` exists and is handled by the import system the same way any other Python module would be. This design serves three purposes: * To avoid confusing existing tools that analyze import statements and expect to find the modules they're importing.
and the :mod:`!__future__` exists and is handled by the import system the same way any other Python module would be. This design serves three purposes: * To avoid confusing existing tools that analyze import statements and expect to find the modules they're importing.
python, official-docs, cpython, P0
Local_Trusted_Corpus
0ab522fe-bb87-495d-8ac2-fdc5c353ff6f
CPython Docs
file://datasets/cpython/Doc/library/__future__.rst
unknown
1f3db80e-37a2-4603-b741-b4099488c436
38,379
supabase-export-v2
0c1ee8792eb51d47
where, normally, *OptionalRelease* is less than *MandatoryRelease*, and both are 5-tuples of the same form as :data:`sys.version_info`:: (PY_MAJOR_VERSION, # the 2 in 2.1.0a3; an int PY_MINOR_VERSION, # the 1; an int PY_MICRO_VERSION, # the 0; an int PY_RELEASE_LEVEL, # "alpha", "beta", "candidate" or "final"; strin...
trusted_official_docs
CPython Docs
where, normally, *OptionalRelease* is less than *MandatoryRelease*, and both are 5-tuples of the same form as :data:`sys.version_info`:: (PY_MAJOR_VERSION, # the 2 in 2.1.0a3; an int PY_MINOR_VERSION, # the 1; an int PY_MICRO_VERSION, # the 0; an int PY_RELEASE_LEVEL, # "alpha", "beta", "candidate" or "final"; strin...
where, normally, *OptionalRelease* is less than *MandatoryRelease*, and both are 5-tuples of the same form as :data:`sys.version_info`:: (PY_MAJOR_VERSION, # the 2 in 2.1.0a3; an int PY_MINOR_VERSION, # the 1; an int PY_MICRO_VERSION, # the 0; an int PY_RELEASE_LEVEL, # "alpha", "beta", "candidate" or "final"; strin...
python, official-docs, cpython, P0
Local_Trusted_Corpus
0f15accd-07ff-4be1-9d1c-1d052e513e8e
CPython Docs
file://datasets/cpython/Doc/library/__future__.rst
unknown
1f3db80e-37a2-4603-b741-b4099488c436
38,372
supabase-export-v2
f4657d56b359d5d6
.. list-table:: :widths: auto :header-rows: 1 * * feature * optional in * mandatory in * effect * * .. data:: nested_scopes * 2.1.0b1 * 2.2 * :pep:`227`: *Statically Nested Scopes* * * .. data:: generators * 2.2.0a1 * 2.3 * :pep:`255`: *Simple Generators* * * .. data:: division * 2.2.0a2 * 3.0 * :pep:`23...
trusted_official_docs
CPython Docs
.. list-table:: :widths: auto :header-rows: 1 * * feature * optional in * mandatory in * effect * * .. data:: nested_scopes * 2.1.0b1 * 2.2 * :pep:`227`: *Statically Nested Scopes* * * .. data:: generators * 2.2.0a1 * 2.3 * :pep:`255`: *Simple Generators* * * .. data:: division * 2.2.0a2 * 3.0 * :pep:`23...
.. list-table:: :widths: auto :header-rows: 1 * * feature * optional in * mandatory in * effect * * .. data:: nested_scopes * 2.1.0b1 * 2.2 * :pep:`227`: *Statically Nested Scopes* * * .. data:: generators * 2.2.0a1 * 2.3 * :pep:`255`: *Simple Generators* * * .. data:: division * 2.2.0a2 * 3.0 * :pep:`23...
python, official-docs, cpython, P0
Local_Trusted_Corpus
31fdf66e-4aa3-43a4-8c96-89c1df0ff64a
CPython Docs
file://datasets/cpython/Doc/library/__future__.rst
unknown
1f3db80e-37a2-4603-b741-b4099488c436
38,365
supabase-export-v2
9797a2f16eabe161
Python compiler to allow the use of new Python features in modules containing the future statement before the release in which the feature becomes standard. While these future statements are given additional special meaning by the Python compiler, they are still executed like any other import statement and the :mod:`!_...
trusted_official_docs
CPython Docs
Python compiler to allow the use of new Python features in modules containing the future statement before the release in which the feature becomes standard. While these future statements are given additional special meaning by the Python compiler, they are still executed like any other import statement and the :mod:`!_...
Python compiler to allow the use of new Python features in modules containing the future statement before the release in which the feature becomes standard. While these future statements are given additional special meaning by the Python compiler, they are still executed like any other import statement and the :mod:`!_...
python, official-docs, cpython, P0
Local_Trusted_Corpus
3dbb74b7-1972-4988-8ec8-fceec61e17c9
CPython Docs
file://datasets/cpython/Doc/library/__future__.rst
unknown
1f3db80e-37a2-4603-b741-b4099488c436
38,371
supabase-export-v2
822e6b84298ce930
will ever be deleted from :mod:`!__future__`. Since its introduction in Python 2.1 the following features have found their way into the language using this mechanism: .. list-table:: :widths: auto :header-rows: 1
trusted_official_docs
CPython Docs
will ever be deleted from :mod:`!__future__`. Since its introduction in Python 2.1 the following features have found their way into the language using this mechanism: .. list-table:: :widths: auto :header-rows: 1
will ever be deleted from :mod:`!__future__`. Since its introduction in Python 2.1 the following features have found their way into the language using this mechanism: .. list-table:: :widths: auto :header-rows: 1
python, official-docs, cpython, P0
Local_Trusted_Corpus
7bb30a45-5dc1-4b45-93fa-07b15fb16775
CPython Docs
file://datasets/cpython/Doc/library/__future__.rst
unknown
1f3db80e-37a2-4603-b741-b4099488c436
38,374
supabase-export-v2
63a56b95ee384a73
inside generators* * * .. data:: annotations * 3.7.0b1 * Never [1]_ * :pep:`563`: *Postponed evaluation of annotations*, :pep:`649`: *Deferred evaluation of annotations using descriptors* .. XXX Adding a new entry? Remember to update simple_stmts.rst, too.
trusted_official_docs
CPython Docs
inside generators* * * .. data:: annotations * 3.7.0b1 * Never [1]_ * :pep:`563`: *Postponed evaluation of annotations*, :pep:`649`: *Deferred evaluation of annotations using descriptors* .. XXX Adding a new entry? Remember to update simple_stmts.rst, too.
inside generators* * * .. data:: annotations * 3.7.0b1 * Never [1]_ * :pep:`563`: *Postponed evaluation of annotations*, :pep:`649`: *Deferred evaluation of annotations using descriptors* .. XXX Adding a new entry? Remember to update simple_stmts.rst, too.
python, official-docs, cpython, P0
Local_Trusted_Corpus
89d062f2-3556-4d4b-82a6-241186c627c9
CPython Docs
file://datasets/cpython/Doc/library/__future__.rst
unknown
1f3db80e-37a2-4603-b741-b4099488c436
38,385
supabase-export-v2
cf65026eda298cf3
releases at or after that, modules no longer need a future statement to use the feature in question, but may continue to use such imports. *MandatoryRelease* may also be ``None``, meaning that a planned feature got dropped or that it is not yet decided.
trusted_official_docs
CPython Docs
releases at or after that, modules no longer need a future statement to use the feature in question, but may continue to use such imports. *MandatoryRelease* may also be ``None``, meaning that a planned feature got dropped or that it is not yet decided.
releases at or after that, modules no longer need a future statement to use the feature in question, but may continue to use such imports. *MandatoryRelease* may also be ``None``, meaning that a planned feature got dropped or that it is not yet decided.
python, official-docs, cpython, P0
Local_Trusted_Corpus
a128f7f8-1699-4811-b03c-356276bfafe6
CPython Docs
file://datasets/cpython/Doc/library/__future__.rst
unknown
1f3db80e-37a2-4603-b741-b4099488c436
38,387
supabase-export-v2
5d70d3281cec0ff4
.. attribute:: _Feature.compiler_flag *CompilerFlag* is the (bitfield) flag that should be passed in the fourth argument to the built-in function :func:`compile` to enable the feature in dynamically compiled code. This flag is stored in the :attr:`_Feature.compiler_flag` attribute on :class:`_Feature` instances.
trusted_official_docs
CPython Docs
.. attribute:: _Feature.compiler_flag *CompilerFlag* is the (bitfield) flag that should be passed in the fourth argument to the built-in function :func:`compile` to enable the feature in dynamically compiled code. This flag is stored in the :attr:`_Feature.compiler_flag` attribute on :class:`_Feature` instances.
.. attribute:: _Feature.compiler_flag *CompilerFlag* is the (bitfield) flag that should be passed in the fourth argument to the built-in function :func:`compile` to enable the feature in dynamically compiled code. This flag is stored in the :attr:`_Feature.compiler_flag` attribute on :class:`_Feature` instances.
python, official-docs, cpython, P0
Local_Trusted_Corpus
a750132b-8a61-4376-9049-6d572a49f81e
CPython Docs
file://datasets/cpython/Doc/library/__future__.rst
unknown
1f3db80e-37a2-4603-b741-b4099488c436
38,388
supabase-export-v2
30b8482dde047eaa
argument to the built-in function :func:`compile` to enable the feature in dynamically compiled code. This flag is stored in the :attr:`_Feature.compiler_flag` attribute on :class:`_Feature` instances. .. [1] ``from __future__ import annotations`` was previously scheduled to become mandatory in Python 3.10, but the c...
trusted_official_docs
CPython Docs
argument to the built-in function :func:`compile` to enable the feature in dynamically compiled code. This flag is stored in the :attr:`_Feature.compiler_flag` attribute on :class:`_Feature` instances. .. [1] ``from __future__ import annotations`` was previously scheduled to become mandatory in Python 3.10, but the c...
argument to the built-in function :func:`compile` to enable the feature in dynamically compiled code. This flag is stored in the :attr:`_Feature.compiler_flag` attribute on :class:`_Feature` instances. .. [1] ``from __future__ import annotations`` was previously scheduled to become mandatory in Python 3.10, but the c...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b61cd443-7b63-4779-bccd-4af258718dbc
CPython Docs
file://datasets/cpython/Doc/library/__future__.rst
unknown
1f3db80e-37a2-4603-b741-b4099488c436
38,384
supabase-export-v2
42571d5ce4a51596
In the case of a *MandatoryRelease* that has not yet occurred, *MandatoryRelease* predicts the release in which the feature will become part of the language. Else *MandatoryRelease* records when the feature became part of the language; in releases at or after that, modules no longer need a future statement to use the ...
trusted_official_docs
CPython Docs
In the case of a *MandatoryRelease* that has not yet occurred, *MandatoryRelease* predicts the release in which the feature will become part of the language. Else *MandatoryRelease* records when the feature became part of the language; in releases at or after that, modules no longer need a future statement to use the ...
In the case of a *MandatoryRelease* that has not yet occurred, *MandatoryRelease* predicts the release in which the feature will become part of the language. Else *MandatoryRelease* records when the feature became part of the language; in releases at or after that, modules no longer need a future statement to use the ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c8ae2fa4-817f-460c-982c-33e154239b5a
CPython Docs
file://datasets/cpython/Doc/library/__future__.rst
unknown
1f3db80e-37a2-4603-b741-b4099488c436
38,370
supabase-export-v2
da1480a40b6aa663
Module Contents --------------- No feature description will ever be deleted from :mod:`!__future__`. Since its introduction in Python 2.1 the following features have found their way into the language using this mechanism:
trusted_official_docs
CPython Docs
Module Contents --------------- No feature description will ever be deleted from :mod:`!__future__`. Since its introduction in Python 2.1 the following features have found their way into the language using this mechanism:
Module Contents --------------- No feature description will ever be deleted from :mod:`!__future__`. Since its introduction in Python 2.1 the following features have found their way into the language using this mechanism:
python, official-docs, cpython, P0
Local_Trusted_Corpus
dfd41de6-6b12-4caa-8152-cd2d3a0420b0
CPython Docs
file://datasets/cpython/Doc/library/__future__.rst
unknown
1f3db80e-37a2-4603-b741-b4099488c436
38,368
supabase-export-v2
12fb467103e2da58
--- or were --- made mandatory. This is a form of executable documentation, and can be inspected programmatically via importing :mod:`!__future__` and examining its contents. * To ensure that :ref:`future statements <future>` run under releases prior to Python 2.1 at least yield runtime exceptions (the import of :mod:...
trusted_official_docs
CPython Docs
--- or were --- made mandatory. This is a form of executable documentation, and can be inspected programmatically via importing :mod:`!__future__` and examining its contents. * To ensure that :ref:`future statements <future>` run under releases prior to Python 2.1 at least yield runtime exceptions (the import of :mod:...
--- or were --- made mandatory. This is a form of executable documentation, and can be inspected programmatically via importing :mod:`!__future__` and examining its contents. * To ensure that :ref:`future statements <future>` run under releases prior to Python 2.1 at least yield runtime exceptions (the import of :mod:...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e90fcb7d-5a36-4b2f-b6c1-7fd7f55ab6b6
CPython Docs
file://datasets/cpython/Doc/library/__future__.rst
unknown
1f3db80e-37a2-4603-b741-b4099488c436
38,373
supabase-export-v2
fc8faace267b884c
* :pep:`3105`: *Make print a function* * * .. data:: unicode_literals * 2.6.0a2 * 3.0 * :pep:`3112`: *Bytes literals in Python 3000* * * .. data:: generator_stop * 3.5.0b1 * 3.7 * :pep:`479`: *StopIteration handling inside generators* * * .. data:: annotations * 3.7.0b1 * Never [1]_ * :pep:`563`: *Postponed eval...
trusted_official_docs
CPython Docs
* :pep:`3105`: *Make print a function* * * .. data:: unicode_literals * 2.6.0a2 * 3.0 * :pep:`3112`: *Bytes literals in Python 3000* * * .. data:: generator_stop * 3.5.0b1 * 3.7 * :pep:`479`: *StopIteration handling inside generators* * * .. data:: annotations * 3.7.0b1 * Never [1]_ * :pep:`563`: *Postponed eval...
* :pep:`3105`: *Make print a function* * * .. data:: unicode_literals * 2.6.0a2 * 3.0 * :pep:`3112`: *Bytes literals in Python 3000* * * .. data:: generator_stop * 3.5.0b1 * 3.7 * :pep:`479`: *StopIteration handling inside generators* * * .. data:: annotations * 3.7.0b1 * Never [1]_ * :pep:`563`: *Postponed eval...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ec5fd305-5163-472f-9eb6-fd7a0499be77
CPython Docs
file://datasets/cpython/Doc/library/__future__.rst
unknown
1f3db80e-37a2-4603-b741-b4099488c436
38,364
supabase-export-v2
86c917e584991bfc
-------------- Imports of the form ``from __future__ import feature`` are called :ref:`future statements <future>`. These are special-cased by the Python compiler to allow the use of new Python features in modules containing the future statement before the release in which the feature becomes standard.
trusted_official_docs
CPython Docs
-------------- Imports of the form ``from __future__ import feature`` are called :ref:`future statements <future>`. These are special-cased by the Python compiler to allow the use of new Python features in modules containing the future statement before the release in which the feature becomes standard.
-------------- Imports of the form ``from __future__ import feature`` are called :ref:`future statements <future>`. These are special-cased by the Python compiler to allow the use of new Python features in modules containing the future statement before the release in which the feature becomes standard.
python, official-docs, cpython, P0
Local_Trusted_Corpus
fba0e138-827c-4165-bcd9-59961b6420fa
CPython Docs
file://datasets/cpython/Doc/library/__future__.rst
unknown
1f3db80e-37a2-4603-b741-b4099488c436
38,367
supabase-export-v2
07e3376251556993
* To avoid confusing existing tools that analyze import statements and expect to find the modules they're importing. * To document when incompatible changes were introduced, and when they will be --- or were --- made mandatory. This is a form of executable documentation, and can be inspected programmatically via impo...
trusted_official_docs
CPython Docs
* To avoid confusing existing tools that analyze import statements and expect to find the modules they're importing. * To document when incompatible changes were introduced, and when they will be --- or were --- made mandatory. This is a form of executable documentation, and can be inspected programmatically via impo...
* To avoid confusing existing tools that analyze import statements and expect to find the modules they're importing. * To document when incompatible changes were introduced, and when they will be --- or were --- made mandatory. This is a form of executable documentation, and can be inspected programmatically via impo...
python, official-docs, cpython, P0
Local_Trusted_Corpus
10496525-44dc-4a81-8b97-103a32240cbe
CPython Docs
file://datasets/cpython/Doc/library/collections.abc.rst
unknown
13180889-19fc-45dc-ae98-c79d19297e43
38,480
supabase-export-v2
57120cdc302d86b6
:term:`Coroutine <coroutine>` objects and instances of the :class:`~collections.abc.Coroutine` ABC are all instances of this ABC. .. note:: In CPython, generator-based coroutines (:term:`generators <generator>` decorated with :deco:`types.coroutine`) are *awaitables*, even though they do not have an :meth:`~object._...
trusted_official_docs
CPython Docs
:term:`Coroutine <coroutine>` objects and instances of the :class:`~collections.abc.Coroutine` ABC are all instances of this ABC. .. note:: In CPython, generator-based coroutines (:term:`generators <generator>` decorated with :deco:`types.coroutine`) are *awaitables*, even though they do not have an :meth:`~object._...
:term:`Coroutine <coroutine>` objects and instances of the :class:`~collections.abc.Coroutine` ABC are all instances of this ABC. .. note:: In CPython, generator-based coroutines (:term:`generators <generator>` decorated with :deco:`types.coroutine`) are *awaitables*, even though they do not have an :meth:`~object._...
python, official-docs, cpython, P0
Local_Trusted_Corpus
12adf823-92e6-40ef-80cb-991b3843319a
CPython Docs
file://datasets/cpython/Doc/library/collections.abc.rst
unknown
13180889-19fc-45dc-ae98-c79d19297e43
38,469
supabase-export-v2
a5f94534607ae416
For use in type annotations, either use :class:`Buffer` or a union that explicitly specifies the types your code supports (e.g., ``bytes | bytearray | memoryview``). :class:`!ByteString` was originally intended to be an abstract class that would serve as a supertype of both :class:`bytes` and :class:`bytearray`. Howev...
trusted_official_docs
CPython Docs
For use in type annotations, either use :class:`Buffer` or a union that explicitly specifies the types your code supports (e.g., ``bytes | bytearray | memoryview``). :class:`!ByteString` was originally intended to be an abstract class that would serve as a supertype of both :class:`bytes` and :class:`bytearray`. Howev...
For use in type annotations, either use :class:`Buffer` or a union that explicitly specifies the types your code supports (e.g., ``bytes | bytearray | memoryview``). :class:`!ByteString` was originally intended to be an abstract class that would serve as a supertype of both :class:`bytes` and :class:`bytearray`. Howev...
python, official-docs, cpython, P0
Local_Trusted_Corpus
153061c6-e743-44b5-ba88-6e69eae94ac5
CPython Docs
file://datasets/cpython/Doc/library/collections.abc.rst
unknown
13180889-19fc-45dc-ae98-c79d19297e43
38,429
supabase-export-v2
c64251e8013be337
:class:`Set` :class:`Collection` ``__contains__``, ``__le__``, ``__lt__``, ``__eq__``, ``__ne__``, ``__iter__``, ``__gt__``, ``__ge__``, ``__and__``, ``__or__``, ``__len__`` ``__sub__``, ``__rsub__``, ``__xor__``, ``__rxor__`` and ``isdisjoint`` :class:`MutableSet` :class:`Set` ``__contains__``, Inherited :class:`Set` ...
trusted_official_docs
CPython Docs
:class:`Set` :class:`Collection` ``__contains__``, ``__le__``, ``__lt__``, ``__eq__``, ``__ne__``, ``__iter__``, ``__gt__``, ``__ge__``, ``__and__``, ``__or__``, ``__len__`` ``__sub__``, ``__rsub__``, ``__xor__``, ``__rxor__`` and ``isdisjoint`` :class:`MutableSet` :class:`Set` ``__contains__``, Inherited :class:`Set` ...
:class:`Set` :class:`Collection` ``__contains__``, ``__le__``, ``__lt__``, ``__eq__``, ``__ne__``, ``__iter__``, ``__gt__``, ``__ge__``, ``__and__``, ``__or__``, ``__len__`` ``__sub__``, ``__rsub__``, ``__xor__``, ``__rxor__`` and ``isdisjoint`` :class:`MutableSet` :class:`Set` ``__contains__``, Inherited :class:`Set` ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
20046b5d-7f6d-4ca6-8b7e-a987dc0d0dd6
CPython Docs
file://datasets/cpython/Doc/library/collections.abc.rst
unknown
13180889-19fc-45dc-ae98-c79d19297e43
38,506
supabase-export-v2
2ed7de72508c9f4e
a different constructor signature, you will need to override :meth:`!_from_iterable` with a classmethod or regular method that can construct new instances from an iterable argument. (2) To override the comparisons (presumably for speed, as the semantics are fixed), redefine :meth:`~object.__le__` and :meth:`~object....
trusted_official_docs
CPython Docs
a different constructor signature, you will need to override :meth:`!_from_iterable` with a classmethod or regular method that can construct new instances from an iterable argument. (2) To override the comparisons (presumably for speed, as the semantics are fixed), redefine :meth:`~object.__le__` and :meth:`~object....
a different constructor signature, you will need to override :meth:`!_from_iterable` with a classmethod or regular method that can construct new instances from an iterable argument. (2) To override the comparisons (presumably for speed, as the semantics are fixed), redefine :meth:`~object.__le__` and :meth:`~object....
python, official-docs, cpython, P0
Local_Trusted_Corpus
22b5a81f-9f4f-4f0e-a390-05bcb109a7eb
CPython Docs
file://datasets/cpython/Doc/library/collections.abc.rst
unknown
13180889-19fc-45dc-ae98-c79d19297e43
38,457
supabase-export-v2
b17107b1aff3c156
ABC for :term:`generator` classes that implement the protocol defined in :pep:`342` that extends :term:`iterators <iterator>` with the :meth:`~generator.send`, :meth:`~generator.throw` and :meth:`~generator.close` methods. See :ref:`annotating-generators-and-coroutines` for details on using :class:`!Generator` in type...
trusted_official_docs
CPython Docs
ABC for :term:`generator` classes that implement the protocol defined in :pep:`342` that extends :term:`iterators <iterator>` with the :meth:`~generator.send`, :meth:`~generator.throw` and :meth:`~generator.close` methods. See :ref:`annotating-generators-and-coroutines` for details on using :class:`!Generator` in type...
ABC for :term:`generator` classes that implement the protocol defined in :pep:`342` that extends :term:`iterators <iterator>` with the :meth:`~generator.send`, :meth:`~generator.throw` and :meth:`~generator.close` methods. See :ref:`annotating-generators-and-coroutines` for details on using :class:`!Generator` in type...
python, official-docs, cpython, P0
Local_Trusted_Corpus
2ac6fea0-12f4-4523-b53e-cdf7a459182e
CPython Docs
file://datasets/cpython/Doc/library/collections.abc.rst
unknown
13180889-19fc-45dc-ae98-c79d19297e43
38,399
supabase-export-v2
8c782dbb3d081ebc
-------------- This module provides :term:`abstract base classes <abstract base class>` that can be used to test whether a class provides a particular interface; for example, whether it is :term:`hashable` or whether it is a :term:`mapping`.
trusted_official_docs
CPython Docs
-------------- This module provides :term:`abstract base classes <abstract base class>` that can be used to test whether a class provides a particular interface; for example, whether it is :term:`hashable` or whether it is a :term:`mapping`.
-------------- This module provides :term:`abstract base classes <abstract base class>` that can be used to test whether a class provides a particular interface; for example, whether it is :term:`hashable` or whether it is a :term:`mapping`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
31dc5f54-3af0-49a2-9410-c13b22b4a140
CPython Docs
file://datasets/cpython/Doc/library/collections.abc.rst
unknown
13180889-19fc-45dc-ae98-c79d19297e43
38,505
supabase-export-v2
1a79af98571db4c9
Notes on using :class:`Set` and :class:`MutableSet` as a mixin: (1) Since some set operations create new sets, the default mixin methods need a way to create new instances from an :term:`iterable`. The class constructor is assumed to have a signature in the form ``ClassName(iterable)``. That assumption is factored-o...
trusted_official_docs
CPython Docs
Notes on using :class:`Set` and :class:`MutableSet` as a mixin: (1) Since some set operations create new sets, the default mixin methods need a way to create new instances from an :term:`iterable`. The class constructor is assumed to have a signature in the form ``ClassName(iterable)``. That assumption is factored-o...
Notes on using :class:`Set` and :class:`MutableSet` as a mixin: (1) Since some set operations create new sets, the default mixin methods need a way to create new instances from an :term:`iterable`. The class constructor is assumed to have a signature in the form ``ClassName(iterable)``. That assumption is factored-o...
python, official-docs, cpython, P0
Local_Trusted_Corpus
457890d6-6982-4896-8fe3-165b6a899e60
CPython Docs
file://datasets/cpython/Doc/library/collections.abc.rst
unknown
13180889-19fc-45dc-ae98-c79d19297e43
38,434
supabase-export-v2
748101a27ae69b91
.. rubric:: Footnotes .. [1] These ABCs override :meth:`~abc.ABCMeta.__subclasshook__` to support testing an interface by verifying the required methods are present and have not been set to :const:`None`. This only works for simple interfaces. More complex interfaces require registration or direct subclassing.
trusted_official_docs
CPython Docs
.. rubric:: Footnotes .. [1] These ABCs override :meth:`~abc.ABCMeta.__subclasshook__` to support testing an interface by verifying the required methods are present and have not been set to :const:`None`. This only works for simple interfaces. More complex interfaces require registration or direct subclassing.
.. rubric:: Footnotes .. [1] These ABCs override :meth:`~abc.ABCMeta.__subclasshook__` to support testing an interface by verifying the required methods are present and have not been set to :const:`None`. This only works for simple interfaces. More complex interfaces require registration or direct subclassing.
python, official-docs, cpython, P0
Local_Trusted_Corpus
473bccfb-7844-44ad-af10-4b7469804f4c
CPython Docs
file://datasets/cpython/Doc/library/collections.abc.rst
unknown
13180889-19fc-45dc-ae98-c79d19297e43
38,435
supabase-export-v2
c989c2fe733c9f79
required methods are present and have not been set to :const:`None`. This only works for simple interfaces. More complex interfaces require registration or direct subclassing. .. [2] Checking ``isinstance(obj, Iterable)`` detects classes that are registered as :class:`Iterable` or that have an :meth:`~container.__iter...
trusted_official_docs
CPython Docs
required methods are present and have not been set to :const:`None`. This only works for simple interfaces. More complex interfaces require registration or direct subclassing. .. [2] Checking ``isinstance(obj, Iterable)`` detects classes that are registered as :class:`Iterable` or that have an :meth:`~container.__iter...
required methods are present and have not been set to :const:`None`. This only works for simple interfaces. More complex interfaces require registration or direct subclassing. .. [2] Checking ``isinstance(obj, Iterable)`` detects classes that are registered as :class:`Iterable` or that have an :meth:`~container.__iter...
python, official-docs, cpython, P0
Local_Trusted_Corpus
603c6cf1-72b6-499a-8d78-558907ce5294
CPython Docs
file://datasets/cpython/Doc/library/collections.abc.rst
unknown
13180889-19fc-45dc-ae98-c79d19297e43
38,436
supabase-export-v2
10f27536be8c5876
does not detect classes that iterate with the :meth:`~object.__getitem__` method. The only reliable way to determine whether an object is :term:`iterable` is to call ``iter(obj)``. Collections Abstract Base Classes -- Detailed Descriptions ----------------------------------------------------------
trusted_official_docs
CPython Docs
does not detect classes that iterate with the :meth:`~object.__getitem__` method. The only reliable way to determine whether an object is :term:`iterable` is to call ``iter(obj)``. Collections Abstract Base Classes -- Detailed Descriptions ----------------------------------------------------------
does not detect classes that iterate with the :meth:`~object.__getitem__` method. The only reliable way to determine whether an object is :term:`iterable` is to call ``iter(obj)``. Collections Abstract Base Classes -- Detailed Descriptions ----------------------------------------------------------
python, official-docs, cpython, P0
Local_Trusted_Corpus
6e576a37-0315-4c79-ac40-18dce3df216f
CPython Docs
file://datasets/cpython/Doc/library/collections.abc.rst
unknown
13180889-19fc-45dc-ae98-c79d19297e43
38,479
supabase-export-v2
74062306aece342e
ABC for :term:`awaitable` objects, which can be used in :keyword:`await` expressions. Custom implementations must provide the :meth:`~object.__await__` method. :term:`Coroutine <coroutine>` objects and instances of the :class:`~collections.abc.Coroutine` ABC are all instances of this ABC.
trusted_official_docs
CPython Docs
ABC for :term:`awaitable` objects, which can be used in :keyword:`await` expressions. Custom implementations must provide the :meth:`~object.__await__` method. :term:`Coroutine <coroutine>` objects and instances of the :class:`~collections.abc.Coroutine` ABC are all instances of this ABC.
ABC for :term:`awaitable` objects, which can be used in :keyword:`await` expressions. Custom implementations must provide the :meth:`~object.__await__` method. :term:`Coroutine <coroutine>` objects and instances of the :class:`~collections.abc.Coroutine` ABC are all instances of this ABC.
python, official-docs, cpython, P0
Local_Trusted_Corpus
721dc744-92bc-4662-a71f-113c675059b4
CPython Docs
file://datasets/cpython/Doc/library/collections.abc.rst
unknown
13180889-19fc-45dc-ae98-c79d19297e43
38,418
supabase-export-v2
19d0d82311ea8ac2
>>> issubclass(E, Iterable) True >>> isinstance(E(), Iterable) True Complex interfaces do not support this last technique because an interface is more than just the presence of method names. Interfaces specify semantics and relationships between methods that cannot be inferred solely from the presence of specific me...
trusted_official_docs
CPython Docs
>>> issubclass(E, Iterable) True >>> isinstance(E(), Iterable) True Complex interfaces do not support this last technique because an interface is more than just the presence of method names. Interfaces specify semantics and relationships between methods that cannot be inferred solely from the presence of specific me...
>>> issubclass(E, Iterable) True >>> isinstance(E(), Iterable) True Complex interfaces do not support this last technique because an interface is more than just the presence of method names. Interfaces specify semantics and relationships between methods that cannot be inferred solely from the presence of specific me...
python, official-docs, cpython, P0
Local_Trusted_Corpus
75ecfdcf-3681-4eb3-b76c-fda6e03e8321
CPython Docs
file://datasets/cpython/Doc/library/collections.abc.rst
unknown
13180889-19fc-45dc-ae98-c79d19297e43
38,430
supabase-export-v2
d76f5c8195d3ad33
:class:`MutableSet` :class:`Set` ``__contains__``, Inherited :class:`Set` methods and ``__iter__``, ``clear``, ``pop``, ``remove``, ``__ior__``, ``__len__``, ``__iand__``, ``__ixor__``, and ``__isub__`` ``add``, ``discard`` :class:`Mapping` :class:`Collection` ``__getitem__``, ``__contains__``, ``keys``, ``items``, ``v...
trusted_official_docs
CPython Docs
:class:`MutableSet` :class:`Set` ``__contains__``, Inherited :class:`Set` methods and ``__iter__``, ``clear``, ``pop``, ``remove``, ``__ior__``, ``__len__``, ``__iand__``, ``__ixor__``, and ``__isub__`` ``add``, ``discard`` :class:`Mapping` :class:`Collection` ``__getitem__``, ``__contains__``, ``keys``, ``items``, ``v...
:class:`MutableSet` :class:`Set` ``__contains__``, Inherited :class:`Set` methods and ``__iter__``, ``clear``, ``pop``, ``remove``, ``__ior__``, ``__len__``, ``__iand__``, ``__ixor__``, and ``__isub__`` ``add``, ``discard`` :class:`Mapping` :class:`Collection` ``__getitem__``, ``__contains__``, ``keys``, ``items``, ``v...
python, official-docs, cpython, P0
Local_Trusted_Corpus
87923aa4-567b-4d09-b443-50dc0a866122
CPython Docs
file://datasets/cpython/Doc/library/collections.abc.rst
unknown
13180889-19fc-45dc-ae98-c79d19297e43
38,498
supabase-export-v2
f2ed642089ad6ea0
size = None if isinstance(myvar, collections.abc.Sized): size = len(myvar) Several of the ABCs are also useful as mixins that make it easier to develop classes supporting container APIs. For example, to write a class supporting the full :class:`Set` API, it is only necessary to supply the three underlying abstract meth...
trusted_official_docs
CPython Docs
size = None if isinstance(myvar, collections.abc.Sized): size = len(myvar) Several of the ABCs are also useful as mixins that make it easier to develop classes supporting container APIs. For example, to write a class supporting the full :class:`Set` API, it is only necessary to supply the three underlying abstract meth...
size = None if isinstance(myvar, collections.abc.Sized): size = len(myvar) Several of the ABCs are also useful as mixins that make it easier to develop classes supporting container APIs. For example, to write a class supporting the full :class:`Set` API, it is only necessary to supply the three underlying abstract meth...
python, official-docs, cpython, P0
Local_Trusted_Corpus
89c350f5-04bc-428d-b14c-08c6e462a41c
CPython Docs
file://datasets/cpython/Doc/library/collections.abc.rst
unknown
13180889-19fc-45dc-ae98-c79d19297e43
38,408
supabase-export-v2
c5f263d4e3041826
.. testcode:: class D: # No inheritance def __init__(self): ... # Extra method not required by the ABC def __getitem__(self, index): ... # Abstract method def __len__(self): ... # Abstract method def count(self, value): ... # Mixin method def index(self, value): ... # Mixin method
trusted_official_docs
CPython Docs
.. testcode:: class D: # No inheritance def __init__(self): ... # Extra method not required by the ABC def __getitem__(self, index): ... # Abstract method def __len__(self): ... # Abstract method def count(self, value): ... # Mixin method def index(self, value): ... # Mixin method
.. testcode:: class D: # No inheritance def __init__(self): ... # Extra method not required by the ABC def __getitem__(self, index): ... # Abstract method def __len__(self): ... # Abstract method def count(self, value): ... # Mixin method def index(self, value): ... # Mixin method
python, official-docs, cpython, P0
Local_Trusted_Corpus
8b24c93a-b28e-49c9-bd4f-16fb3625d573
CPython Docs
file://datasets/cpython/Doc/library/collections.abc.rst
unknown
13180889-19fc-45dc-ae98-c79d19297e43
38,409
supabase-export-v2
79a30dc98ab85f40
index): ... # Abstract method def __len__(self): ... # Abstract method def count(self, value): ... # Mixin method def index(self, value): ... # Mixin method Sequence.register(D) # Register instead of inherit
trusted_official_docs
CPython Docs
index): ... # Abstract method def __len__(self): ... # Abstract method def count(self, value): ... # Mixin method def index(self, value): ... # Mixin method Sequence.register(D) # Register instead of inherit
index): ... # Abstract method def __len__(self): ... # Abstract method def count(self, value): ... # Mixin method def index(self, value): ... # Mixin method Sequence.register(D) # Register instead of inherit
python, official-docs, cpython, P0
Local_Trusted_Corpus
909834b5-55b1-4b74-bbaf-363bc2129c7e
CPython Docs
file://datasets/cpython/Doc/library/collections.abc.rst
unknown
13180889-19fc-45dc-ae98-c79d19297e43
38,401
supabase-export-v2
7b5f1d44c7b4e994
An :func:`issubclass` or :func:`isinstance` test for an interface works in one of three ways. 1) A newly written class can inherit directly from one of the abstract base classes. The class must supply the required abstract methods. The remaining mixin methods come from inheritance and can be overridden if desired. O...
trusted_official_docs
CPython Docs
An :func:`issubclass` or :func:`isinstance` test for an interface works in one of three ways. 1) A newly written class can inherit directly from one of the abstract base classes. The class must supply the required abstract methods. The remaining mixin methods come from inheritance and can be overridden if desired. O...
An :func:`issubclass` or :func:`isinstance` test for an interface works in one of three ways. 1) A newly written class can inherit directly from one of the abstract base classes. The class must supply the required abstract methods. The remaining mixin methods come from inheritance and can be overridden if desired. O...
python, official-docs, cpython, P0
Local_Trusted_Corpus
9ccfa222-ef49-4951-b28b-e55355d87ad4
CPython Docs
file://datasets/cpython/Doc/library/collections.abc.rst
unknown
13180889-19fc-45dc-ae98-c79d19297e43
38,419
supabase-export-v2
04e28b8d41d6105c
presence of specific method names. For example, knowing that a class supplies ``__getitem__``, ``__len__``, and ``__iter__`` is insufficient for distinguishing a :class:`Sequence` from a :class:`Mapping`. .. versionadded:: 3.9 These abstract classes now support ``[]``. See :ref:`types-genericalias` and :pep:`585`.
trusted_official_docs
CPython Docs
presence of specific method names. For example, knowing that a class supplies ``__getitem__``, ``__len__``, and ``__iter__`` is insufficient for distinguishing a :class:`Sequence` from a :class:`Mapping`. .. versionadded:: 3.9 These abstract classes now support ``[]``. See :ref:`types-genericalias` and :pep:`585`.
presence of specific method names. For example, knowing that a class supplies ``__getitem__``, ``__len__``, and ``__iter__`` is insufficient for distinguishing a :class:`Sequence` from a :class:`Mapping`. .. versionadded:: 3.9 These abstract classes now support ``[]``. See :ref:`types-genericalias` and :pep:`585`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
a655aad6-2ff0-475c-bd19-8ba3fc6d44d2
CPython Docs
file://datasets/cpython/Doc/library/collections.abc.rst
unknown
13180889-19fc-45dc-ae98-c79d19297e43
38,468
supabase-export-v2
708f7de48131f59d
.. deprecated-removed:: 3.12 3.17 The :class:`ByteString` ABC has been deprecated. Use ``isinstance(obj, collections.abc.Buffer)`` to test if ``obj`` implements the :ref:`buffer protocol <bufferobjects>` at runtime. For use in type annotations, either use :class:`Buffer` or a union that explicitly specifies the type...
trusted_official_docs
CPython Docs
.. deprecated-removed:: 3.12 3.17 The :class:`ByteString` ABC has been deprecated. Use ``isinstance(obj, collections.abc.Buffer)`` to test if ``obj`` implements the :ref:`buffer protocol <bufferobjects>` at runtime. For use in type annotations, either use :class:`Buffer` or a union that explicitly specifies the type...
.. deprecated-removed:: 3.12 3.17 The :class:`ByteString` ABC has been deprecated. Use ``isinstance(obj, collections.abc.Buffer)`` to test if ``obj`` implements the :ref:`buffer protocol <bufferobjects>` at runtime. For use in type annotations, either use :class:`Buffer` or a union that explicitly specifies the type...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ad96f36c-1d7d-4b58-b577-e4f8948ef78d
CPython Docs
file://datasets/cpython/Doc/library/collections.abc.rst
unknown
13180889-19fc-45dc-ae98-c79d19297e43
38,461
supabase-export-v2
e8c5da2a8e557289
ABCs for read-only and mutable :term:`sequences <sequence>`. Implementation note: Some of the mixin methods, such as :meth:`~container.__iter__`, :meth:`~object.__reversed__`, and :meth:`~sequence.index` make repeated calls to the underlying :meth:`~object.__getitem__` method. Consequently, if :meth:`~object.__getit...
trusted_official_docs
CPython Docs
ABCs for read-only and mutable :term:`sequences <sequence>`. Implementation note: Some of the mixin methods, such as :meth:`~container.__iter__`, :meth:`~object.__reversed__`, and :meth:`~sequence.index` make repeated calls to the underlying :meth:`~object.__getitem__` method. Consequently, if :meth:`~object.__getit...
ABCs for read-only and mutable :term:`sequences <sequence>`. Implementation note: Some of the mixin methods, such as :meth:`~container.__iter__`, :meth:`~object.__reversed__`, and :meth:`~sequence.index` make repeated calls to the underlying :meth:`~object.__getitem__` method. Consequently, if :meth:`~object.__getit...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ae7562ff-3251-4521-969c-1bba0904d266
CPython Docs
file://datasets/cpython/Doc/library/collections.abc.rst
unknown
13180889-19fc-45dc-ae98-c79d19297e43
38,482
supabase-export-v2
0990f1eb7c003064
.. class:: Coroutine ABC for :term:`coroutine` compatible classes. These implement the following methods, defined in :ref:`coroutine-objects`: :meth:`~coroutine.send`, :meth:`~coroutine.throw`, and :meth:`~coroutine.close`. Custom implementations must also implement :meth:`~object.__await__`. All :class:`Coroutine`...
trusted_official_docs
CPython Docs
.. class:: Coroutine ABC for :term:`coroutine` compatible classes. These implement the following methods, defined in :ref:`coroutine-objects`: :meth:`~coroutine.send`, :meth:`~coroutine.throw`, and :meth:`~coroutine.close`. Custom implementations must also implement :meth:`~object.__await__`. All :class:`Coroutine`...
.. class:: Coroutine ABC for :term:`coroutine` compatible classes. These implement the following methods, defined in :ref:`coroutine-objects`: :meth:`~coroutine.send`, :meth:`~coroutine.throw`, and :meth:`~coroutine.close`. Custom implementations must also implement :meth:`~object.__await__`. All :class:`Coroutine`...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c0743768-b0e4-4a39-8084-2c7a4d15e9e8
CPython Docs
file://datasets/cpython/Doc/library/collections.abc.rst
unknown
13180889-19fc-45dc-ae98-c79d19297e43
38,426
supabase-export-v2
e8e718a5836c5f46
:class:`Sequence` :class:`Reversible`, ``__getitem__``, ``__contains__``, ``__iter__``, ``__reversed__``, :class:`Collection` ``__len__`` ``index``, and ``count`` :class:`MutableSequence` :class:`Sequence` ``__getitem__``, Inherited :class:`Sequence` methods and ``__setitem__``, ``append``, ``clear``, ``reverse``, ``e...
trusted_official_docs
CPython Docs
:class:`Sequence` :class:`Reversible`, ``__getitem__``, ``__contains__``, ``__iter__``, ``__reversed__``, :class:`Collection` ``__len__`` ``index``, and ``count`` :class:`MutableSequence` :class:`Sequence` ``__getitem__``, Inherited :class:`Sequence` methods and ``__setitem__``, ``append``, ``clear``, ``reverse``, ``e...
:class:`Sequence` :class:`Reversible`, ``__getitem__``, ``__contains__``, ``__iter__``, ``__reversed__``, :class:`Collection` ``__len__`` ``index``, and ``count`` :class:`MutableSequence` :class:`Sequence` ``__getitem__``, Inherited :class:`Sequence` methods and ``__setitem__``, ``append``, ``clear``, ``reverse``, ``e...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c2a8b2c5-3c3c-4cc3-96dc-fedff3bae77c
CPython Docs
file://datasets/cpython/Doc/library/collections.abc.rst
unknown
13180889-19fc-45dc-ae98-c79d19297e43
38,431
supabase-export-v2
f3e315504dd6151a
:class:`Mapping` :class:`Collection` ``__getitem__``, ``__contains__``, ``keys``, ``items``, ``values``, ``__iter__``, ``get``, ``__eq__``, and ``__ne__`` ``__len__`` :class:`MutableMapping` :class:`Mapping` ``__getitem__``, Inherited :class:`Mapping` methods and ``__setitem__``, ``pop``, ``popitem``, ``clear``, ``upd...
trusted_official_docs
CPython Docs
:class:`Mapping` :class:`Collection` ``__getitem__``, ``__contains__``, ``keys``, ``items``, ``values``, ``__iter__``, ``get``, ``__eq__``, and ``__ne__`` ``__len__`` :class:`MutableMapping` :class:`Mapping` ``__getitem__``, Inherited :class:`Mapping` methods and ``__setitem__``, ``pop``, ``popitem``, ``clear``, ``upd...
:class:`Mapping` :class:`Collection` ``__getitem__``, ``__contains__``, ``keys``, ``items``, ``values``, ``__iter__``, ``get``, ``__eq__``, and ``__ne__`` ``__len__`` :class:`MutableMapping` :class:`Mapping` ``__getitem__``, Inherited :class:`Mapping` methods and ``__setitem__``, ``pop``, ``popitem``, ``clear``, ``upd...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ca14ad7b-d69c-4eed-a9ba-3543a0471205
CPython Docs
file://datasets/cpython/Doc/library/collections.abc.rst
unknown
13180889-19fc-45dc-ae98-c79d19297e43
38,400
supabase-export-v2
5a9a239418f94eb1
that can be used to test whether a class provides a particular interface; for example, whether it is :term:`hashable` or whether it is a :term:`mapping`. An :func:`issubclass` or :func:`isinstance` test for an interface works in one of three ways.
trusted_official_docs
CPython Docs
that can be used to test whether a class provides a particular interface; for example, whether it is :term:`hashable` or whether it is a :term:`mapping`. An :func:`issubclass` or :func:`isinstance` test for an interface works in one of three ways.
that can be used to test whether a class provides a particular interface; for example, whether it is :term:`hashable` or whether it is a :term:`mapping`. An :func:`issubclass` or :func:`isinstance` test for an interface works in one of three ways.
python, official-docs, cpython, P0
Local_Trusted_Corpus
cfe7c3a7-f44b-42bb-b3e6-45cb3a900d9f
CPython Docs
file://datasets/cpython/Doc/library/collections.abc.rst
unknown
13180889-19fc-45dc-ae98-c79d19297e43
38,425
supabase-export-v2
66b74d1e2fdff542
[1]_ :class:`Iterable` ``__reversed__`` :class:`Generator` [1]_ :class:`Iterator` ``send``, ``throw`` ``close``, ``__iter__``, ``__next__`` :class:`Sized` [1]_ ``__len__`` :class:`Callable` [1]_ ``__call__`` :class:`Collection` [1]_ :class:`Sized`, ``__contains__``, :class:`Iterable`, ``__iter__``, :class:`Container` `...
trusted_official_docs
CPython Docs
[1]_ :class:`Iterable` ``__reversed__`` :class:`Generator` [1]_ :class:`Iterator` ``send``, ``throw`` ``close``, ``__iter__``, ``__next__`` :class:`Sized` [1]_ ``__len__`` :class:`Callable` [1]_ ``__call__`` :class:`Collection` [1]_ :class:`Sized`, ``__contains__``, :class:`Iterable`, ``__iter__``, :class:`Container` `...
[1]_ :class:`Iterable` ``__reversed__`` :class:`Generator` [1]_ :class:`Iterator` ``send``, ``throw`` ``close``, ``__iter__``, ``__next__`` :class:`Sized` [1]_ ``__len__`` :class:`Callable` [1]_ ``__call__`` :class:`Collection` [1]_ :class:`Sized`, ``__contains__``, :class:`Iterable`, ``__iter__``, :class:`Container` `...
python, official-docs, cpython, P0
Local_Trusted_Corpus
d3419f0c-66e2-4c4f-a109-50b7c372646c
CPython Docs
file://datasets/cpython/Doc/library/collections.abc.rst
unknown
13180889-19fc-45dc-ae98-c79d19297e43
38,499
supabase-export-v2
e7c3315f16156bad
is only necessary to supply the three underlying abstract methods: :meth:`~object.__contains__`, :meth:`~container.__iter__`, and :meth:`~object.__len__`. The ABC supplies the remaining methods such as :meth:`!__and__` and :meth:`~frozenset.isdisjoint`:: class ListBasedSet(collections.abc.Set): ''' Alternate set imple...
trusted_official_docs
CPython Docs
is only necessary to supply the three underlying abstract methods: :meth:`~object.__contains__`, :meth:`~container.__iter__`, and :meth:`~object.__len__`. The ABC supplies the remaining methods such as :meth:`!__and__` and :meth:`~frozenset.isdisjoint`:: class ListBasedSet(collections.abc.Set): ''' Alternate set imple...
is only necessary to supply the three underlying abstract methods: :meth:`~object.__contains__`, :meth:`~container.__iter__`, and :meth:`~object.__len__`. The ABC supplies the remaining methods such as :meth:`!__and__` and :meth:`~frozenset.isdisjoint`:: class ListBasedSet(collections.abc.Set): ''' Alternate set imple...
python, official-docs, cpython, P0
Local_Trusted_Corpus
d78c0a06-6832-47b2-8012-42f1a77ec05f
CPython Docs
file://datasets/cpython/Doc/library/collections.abc.rst
unknown
13180889-19fc-45dc-ae98-c79d19297e43
38,483
supabase-export-v2
74fd72257d791277
implement the following methods, defined in :ref:`coroutine-objects`: :meth:`~coroutine.send`, :meth:`~coroutine.throw`, and :meth:`~coroutine.close`. Custom implementations must also implement :meth:`~object.__await__`. All :class:`Coroutine` instances are also instances of :class:`Awaitable`. .. note:: In CPython, g...
trusted_official_docs
CPython Docs
implement the following methods, defined in :ref:`coroutine-objects`: :meth:`~coroutine.send`, :meth:`~coroutine.throw`, and :meth:`~coroutine.close`. Custom implementations must also implement :meth:`~object.__await__`. All :class:`Coroutine` instances are also instances of :class:`Awaitable`. .. note:: In CPython, g...
implement the following methods, defined in :ref:`coroutine-objects`: :meth:`~coroutine.send`, :meth:`~coroutine.throw`, and :meth:`~coroutine.close`. Custom implementations must also implement :meth:`~object.__await__`. All :class:`Coroutine` instances are also instances of :class:`Awaitable`. .. note:: In CPython, g...
python, official-docs, cpython, P0
Local_Trusted_Corpus
d7943bce-b72a-4e46-aab2-6a5522012a3f
CPython Docs
file://datasets/cpython/Doc/library/collections.abc.rst
unknown
13180889-19fc-45dc-ae98-c79d19297e43
38,448
supabase-export-v2
5b7256d9436a44c5
ABC for classes that provide the :meth:`~container.__iter__` method. Checking ``isinstance(obj, Iterable)`` detects classes that are registered as :class:`Iterable` or that have an :meth:`~container.__iter__` method, but it does not detect classes that iterate with the :meth:`~object.__getitem__` method. The only re...
trusted_official_docs
CPython Docs
ABC for classes that provide the :meth:`~container.__iter__` method. Checking ``isinstance(obj, Iterable)`` detects classes that are registered as :class:`Iterable` or that have an :meth:`~container.__iter__` method, but it does not detect classes that iterate with the :meth:`~object.__getitem__` method. The only re...
ABC for classes that provide the :meth:`~container.__iter__` method. Checking ``isinstance(obj, Iterable)`` detects classes that are registered as :class:`Iterable` or that have an :meth:`~container.__iter__` method, but it does not detect classes that iterate with the :meth:`~object.__getitem__` method. The only re...
python, official-docs, cpython, P0
Local_Trusted_Corpus
dfa6c3a4-ba1a-432c-bfb7-3204fcf25616
CPython Docs
file://datasets/cpython/Doc/library/collections.abc.rst
unknown
13180889-19fc-45dc-ae98-c79d19297e43
38,413
supabase-export-v2
ebf8fcadb0e50eb9
define ``__contains__``, ``__iter__``, and ``__reversed__`` because the :ref:`in-operator <comparisons>`, the :term:`iteration <iterable>` logic, and the :func:`reversed` function automatically fall back to using ``__getitem__`` and ``__len__``. 3) Some simple interfaces are directly recognizable by the presence of th...
trusted_official_docs
CPython Docs
define ``__contains__``, ``__iter__``, and ``__reversed__`` because the :ref:`in-operator <comparisons>`, the :term:`iteration <iterable>` logic, and the :func:`reversed` function automatically fall back to using ``__getitem__`` and ``__len__``. 3) Some simple interfaces are directly recognizable by the presence of th...
define ``__contains__``, ``__iter__``, and ``__reversed__`` because the :ref:`in-operator <comparisons>`, the :term:`iteration <iterable>` logic, and the :func:`reversed` function automatically fall back to using ``__getitem__`` and ``__len__``. 3) Some simple interfaces are directly recognizable by the presence of th...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e4c7dc21-2021-4d40-9979-88e385d32ca5
CPython Docs
file://datasets/cpython/Doc/library/collections.abc.rst
unknown
13180889-19fc-45dc-ae98-c79d19297e43
38,406
supabase-export-v2
662890d4ba902119
>>> issubclass(C, Sequence) True >>> isinstance(C(), Sequence) True 2) Existing classes and built-in classes can be registered as "virtual subclasses" of the ABCs. Those classes should define the full API including all of the abstract methods and all of the mixin methods. This lets users rely on :func:`issubclass` or...
trusted_official_docs
CPython Docs
>>> issubclass(C, Sequence) True >>> isinstance(C(), Sequence) True 2) Existing classes and built-in classes can be registered as "virtual subclasses" of the ABCs. Those classes should define the full API including all of the abstract methods and all of the mixin methods. This lets users rely on :func:`issubclass` or...
>>> issubclass(C, Sequence) True >>> isinstance(C(), Sequence) True 2) Existing classes and built-in classes can be registered as "virtual subclasses" of the ABCs. Those classes should define the full API including all of the abstract methods and all of the mixin methods. This lets users rely on :func:`issubclass` or...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e6e4e73a-e812-4236-98df-f5fe83bcb649
CPython Docs
file://datasets/cpython/Doc/library/collections.abc.rst
unknown
13180889-19fc-45dc-ae98-c79d19297e43
38,403
supabase-export-v2
2b830feda9ddefef
.. testcode:: class C(Sequence): # Direct inheritance def __init__(self): ... # Extra method not required by the ABC def __getitem__(self, index): ... # Required abstract method def __len__(self): ... # Required abstract method def count(self, value): ... # Optionally override a mixin method
trusted_official_docs
CPython Docs
.. testcode:: class C(Sequence): # Direct inheritance def __init__(self): ... # Extra method not required by the ABC def __getitem__(self, index): ... # Required abstract method def __len__(self): ... # Required abstract method def count(self, value): ... # Optionally override a mixin method
.. testcode:: class C(Sequence): # Direct inheritance def __init__(self): ... # Extra method not required by the ABC def __getitem__(self, index): ... # Required abstract method def __len__(self): ... # Required abstract method def count(self, value): ... # Optionally override a mixin method
python, official-docs, cpython, P0
Local_Trusted_Corpus
e86f38d0-14b9-4438-b40b-e4543013bc33
CPython Docs
file://datasets/cpython/Doc/library/collections.abc.rst
unknown
13180889-19fc-45dc-ae98-c79d19297e43
38,484
supabase-export-v2
d3ebe23417ffd5b0
:deco:`types.coroutine`) are *awaitables*, even though they do not have an :meth:`~object.__await__` method. Using ``isinstance(gencoro, Coroutine)`` for them will return ``False``. Use :func:`inspect.isawaitable` to detect them. See :ref:`annotating-generators-and-coroutines` for details on using :class:`!Coroutine` ...
trusted_official_docs
CPython Docs
:deco:`types.coroutine`) are *awaitables*, even though they do not have an :meth:`~object.__await__` method. Using ``isinstance(gencoro, Coroutine)`` for them will return ``False``. Use :func:`inspect.isawaitable` to detect them. See :ref:`annotating-generators-and-coroutines` for details on using :class:`!Coroutine` ...
:deco:`types.coroutine`) are *awaitables*, even though they do not have an :meth:`~object.__await__` method. Using ``isinstance(gencoro, Coroutine)`` for them will return ``False``. Use :func:`inspect.isawaitable` to detect them. See :ref:`annotating-generators-and-coroutines` for details on using :class:`!Coroutine` ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
f4843190-8bac-42aa-b3bc-019876ff88e2
CPython Docs
file://datasets/cpython/Doc/library/collections.abc.rst
unknown
13180889-19fc-45dc-ae98-c79d19297e43
38,412
supabase-export-v2
72af34d7273acc41
>>> issubclass(D, Sequence) True >>> isinstance(D(), Sequence) True In this example, class :class:`!D` does not need to define ``__contains__``, ``__iter__``, and ``__reversed__`` because the :ref:`in-operator <comparisons>`, the :term:`iteration <iterable>` logic, and the :func:`reversed` function automatically fal...
trusted_official_docs
CPython Docs
>>> issubclass(D, Sequence) True >>> isinstance(D(), Sequence) True In this example, class :class:`!D` does not need to define ``__contains__``, ``__iter__``, and ``__reversed__`` because the :ref:`in-operator <comparisons>`, the :term:`iteration <iterable>` logic, and the :func:`reversed` function automatically fal...
>>> issubclass(D, Sequence) True >>> isinstance(D(), Sequence) True In this example, class :class:`!D` does not need to define ``__contains__``, ``__iter__``, and ``__reversed__`` because the :ref:`in-operator <comparisons>`, the :term:`iteration <iterable>` logic, and the :func:`reversed` function automatically fal...
python, official-docs, cpython, P0
Local_Trusted_Corpus