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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ec8d57fa-ef7b-4d5d-b302-98b2e24632b4 | CPython Docs | file://datasets/cpython/Doc/library/unittest.mock-examples.rst | unknown | 7bcbcebe-cc8a-441d-b05d-03531e5ebd16 | 14,464 | supabase-export-v2 | 5c876b82ef379d97 | >>> something.backend = mock_backend >>> something.method()
Using :attr:`~Mock.mock_calls` we can check the chained call with a single
assert. A chained call is several calls in one line of code, so there will be
several entries in ``mock_calls``. We can use :meth:`call.call_list` to create
this list of calls for us:: | trusted_official_docs | CPython Docs | >>> something.backend = mock_backend >>> something.method()
Using :attr:`~Mock.mock_calls` we can check the chained call with a single
assert. A chained call is several calls in one line of code, so there will be
several entries in ``mock_calls``. We can use :meth:`call.call_list` to create
this list of calls for us:: | >>> something.backend = mock_backend >>> something.method()
Using :attr:`~Mock.mock_calls` we can check the chained call with a single
assert. A chained call is several calls in one line of code, so there will be
several entries in ``mock_calls``. We can use :meth:`call.call_list` to create
this list of calls for us:: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
edc1784f-ddd3-4ecc-9e2b-05afce7af1be | CPython Docs | file://datasets/cpython/Doc/library/unittest.mock-examples.rst | unknown | 7bcbcebe-cc8a-441d-b05d-03531e5ebd16 | 14,389 | supabase-export-v2 | 2ef661656d465d57 | >>> mock = Mock() >>> mock.x = 3 >>> mock.x 3
Sometimes you want to mock up a more complex situation, like for example
``mock.connection.cursor().execute("SELECT 1")``. If we wanted this call to
return a list, then we have to configure the result of the nested call. | trusted_official_docs | CPython Docs | >>> mock = Mock() >>> mock.x = 3 >>> mock.x 3
Sometimes you want to mock up a more complex situation, like for example
``mock.connection.cursor().execute("SELECT 1")``. If we wanted this call to
return a list, then we have to configure the result of the nested call. | >>> mock = Mock() >>> mock.x = 3 >>> mock.x 3
Sometimes you want to mock up a more complex situation, like for example
``mock.connection.cursor().execute("SELECT 1")``. If we wanted this call to
return a list, then we have to configure the result of the nested call. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f008ea23-abd9-443d-b921-32e54d277a0f | CPython Docs | file://datasets/cpython/Doc/library/unittest.mock-examples.rst | unknown | 7bcbcebe-cc8a-441d-b05d-03531e5ebd16 | 14,525 | supabase-export-v2 | c214103086a72fb5 | mymodule.Foo is mock_foo ... assert mymodule.Bar is mock_bar ... assert mymodule.Spam is mock_spam ... >>> original = mymodule.Foo >>> MyTest('test_foo').test_foo() >>> assert mymodule.Foo is original
With unittest ``cleanup`` functions and the :ref:`start-and-stop` we can
achieve the same effect without the nested ind... | trusted_official_docs | CPython Docs | mymodule.Foo is mock_foo ... assert mymodule.Bar is mock_bar ... assert mymodule.Spam is mock_spam ... >>> original = mymodule.Foo >>> MyTest('test_foo').test_foo() >>> assert mymodule.Foo is original
With unittest ``cleanup`` functions and the :ref:`start-and-stop` we can
achieve the same effect without the nested ind... | mymodule.Foo is mock_foo ... assert mymodule.Bar is mock_bar ... assert mymodule.Spam is mock_spam ... >>> original = mymodule.Foo >>> MyTest('test_foo').test_foo() >>> assert mymodule.Foo is original
With unittest ``cleanup`` functions and the :ref:`start-and-stop` we can
achieve the same effect without the nested ind... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f0c48949-068e-4333-97a5-d1b5b1a6f28a | CPython Docs | file://datasets/cpython/Doc/library/unittest.mock-examples.rst | unknown | 7bcbcebe-cc8a-441d-b05d-03531e5ebd16 | 14,521 | supabase-export-v2 | d4428a7522c75292 | arg.add(1) >>> c.assert_called_with(set()) >>> c.assert_called_with(arg) Traceback (most recent call last): ... AssertionError: expected call not found. Expected: mock({1}) Actual: mock(set()) >>> c.foo <CopyingMock name='mock.foo' id='...'>
When you subclass ``Mock`` or ``MagicMock`` all dynamically created attributes... | trusted_official_docs | CPython Docs | arg.add(1) >>> c.assert_called_with(set()) >>> c.assert_called_with(arg) Traceback (most recent call last): ... AssertionError: expected call not found. Expected: mock({1}) Actual: mock(set()) >>> c.foo <CopyingMock name='mock.foo' id='...'>
When you subclass ``Mock`` or ``MagicMock`` all dynamically created attributes... | arg.add(1) >>> c.assert_called_with(set()) >>> c.assert_called_with(arg) Traceback (most recent call last): ... AssertionError: expected call not found. Expected: mock({1}) Actual: mock(set()) >>> c.foo <CopyingMock name='mock.foo' id='...'>
When you subclass ``Mock`` or ``MagicMock`` all dynamically created attributes... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f18c52f8-1e1c-432b-a805-d83796ea3e06 | CPython Docs | file://datasets/cpython/Doc/library/unittest.mock-examples.rst | unknown | 7bcbcebe-cc8a-441d-b05d-03531e5ebd16 | 14,494 | supabase-export-v2 | 35642b4016a2c1d7 | bound method if it is fetched from an instance. It will have ``self`` passed in as the first argument, which is exactly what was needed:
>>> class Foo:
... def foo(self):
... pass
... >>> with patch.object(Foo, 'foo', autospec=True) as mock_foo:
... mock_foo.return_value = 'foo'
... foo = Foo()
... foo.foo()
...... | trusted_official_docs | CPython Docs | bound method if it is fetched from an instance. It will have ``self`` passed in as the first argument, which is exactly what was needed:
>>> class Foo:
... def foo(self):
... pass
... >>> with patch.object(Foo, 'foo', autospec=True) as mock_foo:
... mock_foo.return_value = 'foo'
... foo = Foo()
... foo.foo()
...... | bound method if it is fetched from an instance. It will have ``self`` passed in as the first argument, which is exactly what was needed:
>>> class Foo:
... def foo(self):
... pass
... >>> with patch.object(Foo, 'foo', autospec=True) as mock_foo:
... mock_foo.return_value = 'foo'
... foo = Foo()
... foo.foo()
...... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f19985f9-ad9e-4c78-97ae-08bf458e1fe6 | CPython Docs | file://datasets/cpython/Doc/library/unittest.mock-examples.rst | unknown | 7bcbcebe-cc8a-441d-b05d-03531e5ebd16 | 14,571 | supabase-export-v2 | 099ac0f2bf7cae44 | >>> expected_calls = [call.foo.something(), call.bar.other.thing()] >>> manager.mock_calls == expected_calls True
If ``patch`` is creating, and putting in place, your mocks then you can attach
them to a manager mock using the :meth:`~Mock.attach_mock` method. After
attaching calls will be recorded in ``mock_calls`` of ... | trusted_official_docs | CPython Docs | >>> expected_calls = [call.foo.something(), call.bar.other.thing()] >>> manager.mock_calls == expected_calls True
If ``patch`` is creating, and putting in place, your mocks then you can attach
them to a manager mock using the :meth:`~Mock.attach_mock` method. After
attaching calls will be recorded in ``mock_calls`` of ... | >>> expected_calls = [call.foo.something(), call.bar.other.thing()] >>> manager.mock_calls == expected_calls True
If ``patch`` is creating, and putting in place, your mocks then you can attach
them to a manager mock using the :meth:`~Mock.attach_mock` method. After
attaching calls will be recorded in ``mock_calls`` of ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f5b26c8d-720f-4e9a-b6d0-9cb35e15ca4c | CPython Docs | file://datasets/cpython/Doc/library/unittest.mock-examples.rst | unknown | 7bcbcebe-cc8a-441d-b05d-03531e5ebd16 | 14,461 | supabase-export-v2 | dc424b8389ebde75 | We can do that in a slightly nicer way using the :meth:`~Mock.configure_mock` method to directly set the return value for us::
>>> something = Something()
>>> mock_response = Mock(spec=open)
>>> mock_backend = Mock()
>>> config = {'get_endpoint.return_value.create_call.return_value.start_call.return_value': mock_res... | trusted_official_docs | CPython Docs | We can do that in a slightly nicer way using the :meth:`~Mock.configure_mock` method to directly set the return value for us::
>>> something = Something()
>>> mock_response = Mock(spec=open)
>>> mock_backend = Mock()
>>> config = {'get_endpoint.return_value.create_call.return_value.start_call.return_value': mock_res... | We can do that in a slightly nicer way using the :meth:`~Mock.configure_mock` method to directly set the return value for us::
>>> something = Something()
>>> mock_response = Mock(spec=open)
>>> mock_backend = Mock()
>>> config = {'get_endpoint.return_value.create_call.return_value.start_call.return_value': mock_res... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f5bc2e52-c527-401a-9f7e-e6e531d093e8 | CPython Docs | file://datasets/cpython/Doc/library/unittest.mock-examples.rst | unknown | 7bcbcebe-cc8a-441d-b05d-03531e5ebd16 | 14,544 | supabase-export-v2 | 6567d731a3f51ece | There are various reasons why you might want to subclass :class:`Mock`. One reason might be to add helper methods. Here's a silly example:
>>> class MyMock(MagicMock):
... def has_been_called(self):
... return self.called
... >>> mymock = MyMock(return_value=None)
>>> mymock
<MyMock id='...'>
>>> mymock.has_been_... | trusted_official_docs | CPython Docs | There are various reasons why you might want to subclass :class:`Mock`. One reason might be to add helper methods. Here's a silly example:
>>> class MyMock(MagicMock):
... def has_been_called(self):
... return self.called
... >>> mymock = MyMock(return_value=None)
>>> mymock
<MyMock id='...'>
>>> mymock.has_been_... | There are various reasons why you might want to subclass :class:`Mock`. One reason might be to add helper methods. Here's a silly example:
>>> class MyMock(MagicMock):
... def has_been_called(self):
... return self.called
... >>> mymock = MyMock(return_value=None)
>>> mymock
<MyMock id='...'>
>>> mymock.has_been_... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f6631e73-9a6e-4802-96f8-4807aca84d88 | CPython Docs | file://datasets/cpython/Doc/library/unittest.mock-examples.rst | unknown | 7bcbcebe-cc8a-441d-b05d-03531e5ebd16 | 14,374 | supabase-export-v2 | 7792f6526a7564db | than a single call to a method. The :attr:`~Mock.mock_calls` attribute records all calls to child attributes of the mock - and also to their children.
>>> mock = MagicMock()
>>> mock.method()
<MagicMock name='mock.method()' id='...'>
>>> mock.attribute.method(10, x=53)
<MagicMock name='mock.attribute.method()' id='... | trusted_official_docs | CPython Docs | than a single call to a method. The :attr:`~Mock.mock_calls` attribute records all calls to child attributes of the mock - and also to their children.
>>> mock = MagicMock()
>>> mock.method()
<MagicMock name='mock.method()' id='...'>
>>> mock.attribute.method(10, x=53)
<MagicMock name='mock.attribute.method()' id='... | than a single call to a method. The :attr:`~Mock.mock_calls` attribute records all calls to child attributes of the mock - and also to their children.
>>> mock = MagicMock()
>>> mock.method()
<MagicMock name='mock.method()' id='...'>
>>> mock.attribute.method(10, x=53)
<MagicMock name='mock.attribute.method()' id='... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f8659e2b-59ab-4aa9-ba4b-13a8f922991a | CPython Docs | file://datasets/cpython/Doc/library/unittest.mock-examples.rst | unknown | 7bcbcebe-cc8a-441d-b05d-03531e5ebd16 | 14,355 | supabase-export-v2 | 0b88d058cec32f81 | examples the :class:`Mock` and :class:`MagicMock` classes are interchangeable. As the ``MagicMock`` is the more capable class it makes a sensible one to use by default.
Once the mock has been called its :attr:`~Mock.called` attribute is set to
``True``. More importantly we can use the :meth:`~Mock.assert_called_with` o... | trusted_official_docs | CPython Docs | examples the :class:`Mock` and :class:`MagicMock` classes are interchangeable. As the ``MagicMock`` is the more capable class it makes a sensible one to use by default.
Once the mock has been called its :attr:`~Mock.called` attribute is set to
``True``. More importantly we can use the :meth:`~Mock.assert_called_with` o... | examples the :class:`Mock` and :class:`MagicMock` classes are interchangeable. As the ``MagicMock`` is the more capable class it makes a sensible one to use by default.
Once the mock has been called its :attr:`~Mock.called` attribute is set to
``True``. More importantly we can use the :meth:`~Mock.assert_called_with` o... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f89bbbe2-65c8-4b3a-96a4-29b949b5cad5 | CPython Docs | file://datasets/cpython/Doc/library/unittest.mock-examples.rst | unknown | 7bcbcebe-cc8a-441d-b05d-03531e5ebd16 | 14,360 | supabase-export-v2 | 1e9117da7141be32 | pass an object into a method (or some part of the system under test) and then check that it is used in the correct way.
The simple ``ProductionClass`` below has a ``closer`` method. If it is called with
an object then it calls ``close`` on it. | trusted_official_docs | CPython Docs | pass an object into a method (or some part of the system under test) and then check that it is used in the correct way.
The simple ``ProductionClass`` below has a ``closer`` method. If it is called with
an object then it calls ``close`` on it. | pass an object into a method (or some part of the system under test) and then check that it is used in the correct way.
The simple ``ProductionClass`` below has a ``closer`` method. If it is called with
an object then it calls ``close`` on it. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f943dbe0-0895-4be6-bbb2-88b0a4ad1ae4 | CPython Docs | file://datasets/cpython/Doc/library/unittest.mock-examples.rst | unknown | 7bcbcebe-cc8a-441d-b05d-03531e5ebd16 | 14,527 | supabase-export-v2 | 43153b531c603f83 | mymodule.Foo is mock_foo ... assert mymodule.Bar is mock_bar ... assert mymodule.Spam is mock_spam ... >>> original = mymodule.Foo >>> MyTest('test_foo').run() >>> assert mymodule.Foo is original
Mocking a dictionary with MagicMock
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | trusted_official_docs | CPython Docs | mymodule.Foo is mock_foo ... assert mymodule.Bar is mock_bar ... assert mymodule.Spam is mock_spam ... >>> original = mymodule.Foo >>> MyTest('test_foo').run() >>> assert mymodule.Foo is original
Mocking a dictionary with MagicMock
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | mymodule.Foo is mock_foo ... assert mymodule.Bar is mock_bar ... assert mymodule.Spam is mock_spam ... >>> original = mymodule.Foo >>> MyTest('test_foo').run() >>> assert mymodule.Foo is original
Mocking a dictionary with MagicMock
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f9716e02-53c2-4ab4-835f-e757da0b6abb | CPython Docs | file://datasets/cpython/Doc/library/unittest.mock-examples.rst | unknown | 7bcbcebe-cc8a-441d-b05d-03531e5ebd16 | 14,462 | supabase-export-v2 | ecdd08d463d647b1 | >>> something = Something() >>> mock_response = Mock(spec=open) >>> mock_backend = Mock() >>> config = {'get_endpoint.return_value.create_call.return_value.start_call.return_value': mock_response} >>> mock_backend.configure_mock(**config)
With these we monkey patch the "mock backend" in place and can make the real
call... | trusted_official_docs | CPython Docs | >>> something = Something() >>> mock_response = Mock(spec=open) >>> mock_backend = Mock() >>> config = {'get_endpoint.return_value.create_call.return_value.start_call.return_value': mock_response} >>> mock_backend.configure_mock(**config)
With these we monkey patch the "mock backend" in place and can make the real
call... | >>> something = Something() >>> mock_response = Mock(spec=open) >>> mock_backend = Mock() >>> config = {'get_endpoint.return_value.create_call.return_value.start_call.return_value': mock_response} >>> mock_backend.configure_mock(**config)
With these we monkey patch the "mock backend" in place and can make the real
call... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fadea3f2-8c79-4d5e-afd7-2013ed6bf8d1 | CPython Docs | file://datasets/cpython/Doc/library/unittest.mock-examples.rst | unknown | 7bcbcebe-cc8a-441d-b05d-03531e5ebd16 | 14,451 | supabase-export-v2 | b1452ba49a53b61b | attribute. When a mock is called for the first time, or you fetch its ``return_value`` before it has been called, a new :class:`Mock` is created.
This means that you can see how the object returned from a call to a mocked
object has been used by interrogating the ``return_value`` mock: | trusted_official_docs | CPython Docs | attribute. When a mock is called for the first time, or you fetch its ``return_value`` before it has been called, a new :class:`Mock` is created.
This means that you can see how the object returned from a call to a mocked
object has been used by interrogating the ``return_value`` mock: | attribute. When a mock is called for the first time, or you fetch its ``return_value`` before it has been called, a new :class:`Mock` is created.
This means that you can see how the object returned from a call to a mocked
object has been used by interrogating the ``return_value`` mock: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
01ff1aff-e314-4344-9641-516e677af3d6 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,661 | supabase-export-v2 | b4a996c3fab447b1 | .. warning::
Registering a file descriptor that's already registered is not an
error, but the result is undefined. The appropriate action is to
unregister or modify it first. This is an important difference
compared with :c:func:`!poll`. | trusted_official_docs | CPython Docs | .. warning::
Registering a file descriptor that's already registered is not an
error, but the result is undefined. The appropriate action is to
unregister or modify it first. This is an important difference
compared with :c:func:`!poll`. | .. warning::
Registering a file descriptor that's already registered is not an
error, but the result is undefined. The appropriate action is to
unregister or modify it first. This is an important difference
compared with :c:func:`!poll`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
02fe17cb-f193-4b6f-97bd-3b26242c37b7 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,746 | supabase-export-v2 | 061274d915f0f09b | :const:`KQ_NOTE_CHILD` | returned on the child process for | | | *NOTE_TRACK* | +----------------------------+--------------------------------------------+ | :const:`KQ_NOTE_TRACKERR` | unable to attach to a child | +----------------------------+--------------------------------------------+
:const:`KQ_FILTER_NETDEV` fi... | trusted_official_docs | CPython Docs | :const:`KQ_NOTE_CHILD` | returned on the child process for | | | *NOTE_TRACK* | +----------------------------+--------------------------------------------+ | :const:`KQ_NOTE_TRACKERR` | unable to attach to a child | +----------------------------+--------------------------------------------+
:const:`KQ_FILTER_NETDEV` fi... | :const:`KQ_NOTE_CHILD` | returned on the child process for | | | *NOTE_TRACK* | +----------------------------+--------------------------------------------+ | :const:`KQ_NOTE_TRACKERR` | unable to attach to a child | +----------------------------+--------------------------------------------+
:const:`KQ_FILTER_NETDEV` fi... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0345ed42-8f6d-4b61-a56d-7e08844b9310 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,705 | supabase-export-v2 | d6a81a6427139965 | peer closed connection, or | | | shut down writing half of connection | +-------------------+------------------------------------------+ | :const:`POLLNVAL` | Invalid request: descriptor not open | +-------------------+------------------------------------------+
Registering a file descriptor that's already registered i... | trusted_official_docs | CPython Docs | peer closed connection, or | | | shut down writing half of connection | +-------------------+------------------------------------------+ | :const:`POLLNVAL` | Invalid request: descriptor not open | +-------------------+------------------------------------------+
Registering a file descriptor that's already registered i... | peer closed connection, or | | | shut down writing half of connection | +-------------------+------------------------------------------+ | :const:`POLLNVAL` | Invalid request: descriptor not open | +-------------------+------------------------------------------+
Registering a file descriptor that's already registered i... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0883717c-51d2-4191-92dc-6006dfb2ce62 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,646 | supabase-export-v2 | 0b79af79c9502bce | ``/dev/poll`` Polling Objects -----------------------------
Solaris and derivatives have ``/dev/poll``. While :c:func:`!select` is
*O*\ (*highest file descriptor*) and :c:func:`!poll` is *O*\ (*number of file
descriptors*), ``/dev/poll`` is *O*\ (*active file descriptors*). | trusted_official_docs | CPython Docs | ``/dev/poll`` Polling Objects -----------------------------
Solaris and derivatives have ``/dev/poll``. While :c:func:`!select` is
*O*\ (*highest file descriptor*) and :c:func:`!poll` is *O*\ (*number of file
descriptors*), ``/dev/poll`` is *O*\ (*active file descriptors*). | ``/dev/poll`` Polling Objects -----------------------------
Solaris and derivatives have ``/dev/poll``. While :c:func:`!select` is
*O*\ (*highest file descriptor*) and :c:func:`!poll` is *O*\ (*number of file
descriptors*), ``/dev/poll`` is *O*\ (*active file descriptors*). | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
11808d5f-5639-47bf-b964-6b71e208293a | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,659 | supabase-export-v2 | 253ec7c5d73b1739 | integer, or an object with a :meth:`~io.IOBase.fileno` method that returns an integer. File objects implement :meth:`!fileno`, so they can also be used as the argument.
*eventmask* is an optional bitmask describing the type of events you want to
check for. The constants are the same as with :c:func:`!poll`
object. Th... | trusted_official_docs | CPython Docs | integer, or an object with a :meth:`~io.IOBase.fileno` method that returns an integer. File objects implement :meth:`!fileno`, so they can also be used as the argument.
*eventmask* is an optional bitmask describing the type of events you want to
check for. The constants are the same as with :c:func:`!poll`
object. Th... | integer, or an object with a :meth:`~io.IOBase.fileno` method that returns an integer. File objects implement :meth:`!fileno`, so they can also be used as the argument.
*eventmask* is an optional bitmask describing the type of events you want to
check for. The constants are the same as with :c:func:`!poll`
object. Th... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
157db3eb-b93d-4e0b-957c-8735458c4b35 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,639 | supabase-export-v2 | 6e873e1635ecd3dc | sockets are. On Windows, the underlying :c:func:`!select` function is provided by the WinSock library, and does not handle file descriptors that don't originate from WinSock.
.. versionchanged:: 3.5
The function is now retried with a recomputed timeout when interrupted by
a signal, except if the signal handler raises... | trusted_official_docs | CPython Docs | sockets are. On Windows, the underlying :c:func:`!select` function is provided by the WinSock library, and does not handle file descriptors that don't originate from WinSock.
.. versionchanged:: 3.5
The function is now retried with a recomputed timeout when interrupted by
a signal, except if the signal handler raises... | sockets are. On Windows, the underlying :c:func:`!select` function is provided by the WinSock library, and does not handle file descriptors that don't originate from WinSock.
.. versionchanged:: 3.5
The function is now retried with a recomputed timeout when interrupted by
a signal, except if the signal handler raises... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1aeac756-ff21-49ba-97b3-ba860f36ac5f | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,727 | supabase-export-v2 | 8e316a9f6b550f97 | or ``None`` - max_events must be 0 or a positive integer - timeout in seconds (non-integers are possible); the default is ``None``, to wait forever
.. versionchanged:: 3.5
The function is now retried with a recomputed timeout when interrupted by
a signal, except if the signal handler raises an exception (see
:pep:`4... | trusted_official_docs | CPython Docs | or ``None`` - max_events must be 0 or a positive integer - timeout in seconds (non-integers are possible); the default is ``None``, to wait forever
.. versionchanged:: 3.5
The function is now retried with a recomputed timeout when interrupted by
a signal, except if the signal handler raises an exception (see
:pep:`4... | or ``None`` - max_events must be 0 or a positive integer - timeout in seconds (non-integers are possible); the default is ``None``, to wait forever
.. versionchanged:: 3.5
The function is now retried with a recomputed timeout when interrupted by
a signal, except if the signal handler raises an exception (see
:pep:`4... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1b8880d9-1643-4750-a821-5b5521eac1f8 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,714 | supabase-export-v2 | ed79c3f96b45a2cf | a recomputed timeout when interrupted by a signal, except if the signal handler raises an exception (see :pep:`475` for the rationale), instead of raising :exc:`InterruptedError`.
.. versionchanged:: 3.15
Accepts any real number as *timeout*, not only integer or float. If ``ppoll()`` function is available, *timeout* h... | trusted_official_docs | CPython Docs | a recomputed timeout when interrupted by a signal, except if the signal handler raises an exception (see :pep:`475` for the rationale), instead of raising :exc:`InterruptedError`.
.. versionchanged:: 3.15
Accepts any real number as *timeout*, not only integer or float. If ``ppoll()`` function is available, *timeout* h... | a recomputed timeout when interrupted by a signal, except if the signal handler raises an exception (see :pep:`475` for the rationale), instead of raising :exc:`InterruptedError`.
.. versionchanged:: 3.15
Accepts any real number as *timeout*, not only integer or float. If ``ppoll()`` function is available, *timeout* h... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1f73e67f-1062-43bd-9053-7b292018610c | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,658 | supabase-export-v2 | 10290b86d5ebff08 | .. method:: devpoll.register(fd[, eventmask])
Register a file descriptor with the polling object. Future calls to the
:meth:`poll` method will then check whether the file descriptor has any
pending I/O events. *fd* can be either an integer, or an object with a
:meth:`~io.IOBase.fileno` method that returns an integer... | trusted_official_docs | CPython Docs | .. method:: devpoll.register(fd[, eventmask])
Register a file descriptor with the polling object. Future calls to the
:meth:`poll` method will then check whether the file descriptor has any
pending I/O events. *fd* can be either an integer, or an object with a
:meth:`~io.IOBase.fileno` method that returns an integer... | .. method:: devpoll.register(fd[, eventmask])
Register a file descriptor with the polling object. Future calls to the
:meth:`poll` method will then check whether the file descriptor has any
pending I/O events. *fd* can be either an integer, or an object with a
:meth:`~io.IOBase.fileno` method that returns an integer... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
26bf85d6-fb66-46bf-8545-06a8c8fa06c5 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,679 | supabase-export-v2 | e386f039b7bc3a88 | .. versionadded:: 3.6 :const:`EPOLLEXCLUSIVE` was added. It's only supported by Linux Kernel 4.5 or later.
.. versionadded:: 3.14
:const:`EPOLLWAKEUP` was added. It's only supported by Linux Kernel 3.5
or later. | trusted_official_docs | CPython Docs | .. versionadded:: 3.6 :const:`EPOLLEXCLUSIVE` was added. It's only supported by Linux Kernel 4.5 or later.
.. versionadded:: 3.14
:const:`EPOLLWAKEUP` was added. It's only supported by Linux Kernel 3.5
or later. | .. versionadded:: 3.6 :const:`EPOLLEXCLUSIVE` was added. It's only supported by Linux Kernel 4.5 or later.
.. versionadded:: 3.14
:const:`EPOLLWAKEUP` was added. It's only supported by Linux Kernel 3.5
or later. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2ada5b1d-60a8-4598-a3b6-b0be50348317 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,674 | supabase-export-v2 | dbe08f08f0be5366 | *eventmask*
+-------------------------+-----------------------------------------------+
| Constant | Meaning |
+=========================+===============================================+
| :const:`EPOLLIN` | Available for read |
+-------------------------+-----------------------------------------------+
| :const:`... | trusted_official_docs | CPython Docs | *eventmask*
+-------------------------+-----------------------------------------------+
| Constant | Meaning |
+=========================+===============================================+
| :const:`EPOLLIN` | Available for read |
+-------------------------+-----------------------------------------------+
| :const:`... | *eventmask*
+-------------------------+-----------------------------------------------+
| Constant | Meaning |
+=========================+===============================================+
| :const:`EPOLLIN` | Available for read |
+-------------------------+-----------------------------------------------+
| :const:`... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3c5d474c-50b8-40ed-be99-772ffbab1d81 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,726 | supabase-export-v2 | 7d07a1e5e52e9b24 | Low level interface to kevent
- changelist must be an iterable of kevent objects or ``None``
- max_events must be 0 or a positive integer
- timeout in seconds (non-integers are possible); the default is ``None``,
to wait forever | trusted_official_docs | CPython Docs | Low level interface to kevent
- changelist must be an iterable of kevent objects or ``None``
- max_events must be 0 or a positive integer
- timeout in seconds (non-integers are possible); the default is ``None``,
to wait forever | Low level interface to kevent
- changelist must be an iterable of kevent objects or ``None``
- max_events must be 0 or a positive integer
- timeout in seconds (non-integers are possible); the default is ``None``,
to wait forever | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
428e04c1-b9ef-47c9-bdd8-171d974d2296 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,665 | supabase-export-v2 | daac577e02528a75 | .. method:: devpoll.unregister(fd)
Remove a file descriptor being tracked by a polling object. Just like the
:meth:`register` method, *fd* can be an integer or an object with a
:meth:`~io.IOBase.fileno` method that returns an integer. | trusted_official_docs | CPython Docs | .. method:: devpoll.unregister(fd)
Remove a file descriptor being tracked by a polling object. Just like the
:meth:`register` method, *fd* can be an integer or an object with a
:meth:`~io.IOBase.fileno` method that returns an integer. | .. method:: devpoll.unregister(fd)
Remove a file descriptor being tracked by a polling object. Just like the
:meth:`register` method, *fd* can be an integer or an object with a
:meth:`~io.IOBase.fileno` method that returns an integer. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
461631e7-b2c5-4007-bca5-1da70bc06b52 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,702 | supabase-export-v2 | 8c23521557531651 | .. method:: poll.register(fd[, eventmask])
Register a file descriptor with the polling object. Future calls to the
:meth:`poll` method will then check whether the file descriptor has any
pending I/O events. *fd* can be either an integer, or an object with a
:meth:`~io.IOBase.fileno` method that returns an integer. F... | trusted_official_docs | CPython Docs | .. method:: poll.register(fd[, eventmask])
Register a file descriptor with the polling object. Future calls to the
:meth:`poll` method will then check whether the file descriptor has any
pending I/O events. *fd* can be either an integer, or an object with a
:meth:`~io.IOBase.fileno` method that returns an integer. F... | .. method:: poll.register(fd[, eventmask])
Register a file descriptor with the polling object. Future calls to the
:meth:`poll` method will then check whether the file descriptor has any
pending I/O events. *fd* can be either an integer, or an object with a
:meth:`~io.IOBase.fileno` method that returns an integer. F... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
46b0c8c9-28be-47a9-a835-8871dfa8c79c | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,709 | supabase-export-v2 | 136955a01f18faee | .. method:: poll.unregister(fd)
Remove a file descriptor being tracked by a polling object. Just like the
:meth:`register` method, *fd* can be an integer or an object with a
:meth:`~io.IOBase.fileno` method that returns an integer. | trusted_official_docs | CPython Docs | .. method:: poll.unregister(fd)
Remove a file descriptor being tracked by a polling object. Just like the
:meth:`register` method, *fd* can be an integer or an object with a
:meth:`~io.IOBase.fileno` method that returns an integer. | .. method:: poll.unregister(fd)
Remove a file descriptor being tracked by a polling object. Just like the
:meth:`register` method, *fd* can be an integer or an object with a
:meth:`~io.IOBase.fileno` method that returns an integer. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4a0fd60d-8126-48a7-a7d2-0f8fde2b9ad7 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,666 | supabase-export-v2 | 8a78719e0e3ccd88 | by a polling object. Just like the :meth:`register` method, *fd* can be an integer or an object with a :meth:`~io.IOBase.fileno` method that returns an integer.
Attempting to remove a file descriptor that was never registered is
safely ignored. | trusted_official_docs | CPython Docs | by a polling object. Just like the :meth:`register` method, *fd* can be an integer or an object with a :meth:`~io.IOBase.fileno` method that returns an integer.
Attempting to remove a file descriptor that was never registered is
safely ignored. | by a polling object. Just like the :meth:`register` method, *fd* can be an integer or an object with a :meth:`~io.IOBase.fileno` method that returns an integer.
Attempting to remove a file descriptor that was never registered is
safely ignored. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4bc569c2-5217-45d9-92cf-65e166619118 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,607 | supabase-export-v2 | 3980ec068c38389e | If your program reduces this value, :c:func:`!devpoll` will fail. If your program increases this value, :c:func:`!devpoll` may return an incomplete list of active file descriptors.
The new file descriptor is :ref:`non-inheritable <fd_inheritance>`. | trusted_official_docs | CPython Docs | If your program reduces this value, :c:func:`!devpoll` will fail. If your program increases this value, :c:func:`!devpoll` may return an incomplete list of active file descriptors.
The new file descriptor is :ref:`non-inheritable <fd_inheritance>`. | If your program reduces this value, :c:func:`!devpoll` will fail. If your program increases this value, :c:func:`!devpoll` may return an incomplete list of active file descriptors.
The new file descriptor is :ref:`non-inheritable <fd_inheritance>`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
56ba09e1-4063-4f2b-9af1-c441b85c7919 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,732 | supabase-export-v2 | 0a82d735ca68f283 | .. attribute:: kevent.ident
Value used to identify the event. The interpretation depends on the filter
but it's usually the file descriptor. In the constructor ident can either
be an int or an object with a :meth:`~io.IOBase.fileno` method. kevent
stores the integer internally. | trusted_official_docs | CPython Docs | .. attribute:: kevent.ident
Value used to identify the event. The interpretation depends on the filter
but it's usually the file descriptor. In the constructor ident can either
be an int or an object with a :meth:`~io.IOBase.fileno` method. kevent
stores the integer internally. | .. attribute:: kevent.ident
Value used to identify the event. The interpretation depends on the filter
but it's usually the file descriptor. In the constructor ident can either
be an int or an object with a :meth:`~io.IOBase.fileno` method. kevent
stores the integer internally. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5bb684ae-531e-4546-bff0-f7b8263c9a57 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,647 | supabase-export-v2 | c9386394f9512c93 | and derivatives have ``/dev/poll``. While :c:func:`!select` is *O*\ (*highest file descriptor*) and :c:func:`!poll` is *O*\ (*number of file descriptors*), ``/dev/poll`` is *O*\ (*active file descriptors*).
``/dev/poll`` behaviour is very close to the standard :c:func:`!poll`
object. | trusted_official_docs | CPython Docs | and derivatives have ``/dev/poll``. While :c:func:`!select` is *O*\ (*highest file descriptor*) and :c:func:`!poll` is *O*\ (*number of file descriptors*), ``/dev/poll`` is *O*\ (*active file descriptors*).
``/dev/poll`` behaviour is very close to the standard :c:func:`!poll`
object. | and derivatives have ``/dev/poll``. While :c:func:`!select` is *O*\ (*highest file descriptor*) and :c:func:`!poll` is *O*\ (*number of file descriptors*), ``/dev/poll`` is *O*\ (*active file descriptors*).
``/dev/poll`` behaviour is very close to the standard :c:func:`!poll`
object. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5d4c8e9a-e07d-49a4-996d-bd51e7c8fe82 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,615 | supabase-export-v2 | c2b342d81d48c231 | See the :ref:`epoll-objects` section below for the methods supported by epolling objects.
``epoll`` objects support the context management protocol: when used in a
:keyword:`with` statement, the new file descriptor is automatically closed
at the end of the block. | trusted_official_docs | CPython Docs | See the :ref:`epoll-objects` section below for the methods supported by epolling objects.
``epoll`` objects support the context management protocol: when used in a
:keyword:`with` statement, the new file descriptor is automatically closed
at the end of the block. | See the :ref:`epoll-objects` section below for the methods supported by epolling objects.
``epoll`` objects support the context management protocol: when used in a
:keyword:`with` statement, the new file descriptor is automatically closed
at the end of the block. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
638d062c-bc76-4d24-a5c4-e5c397a57448 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,737 | supabase-export-v2 | a306dcf3777bd2c7 | Filter action.
+---------------------------+---------------------------------------------+
| Constant | Meaning |
+===========================+=============================================+
| :const:`KQ_EV_ADD` | Adds or modifies an event |
+---------------------------+---------------------------------------------+... | trusted_official_docs | CPython Docs | Filter action.
+---------------------------+---------------------------------------------+
| Constant | Meaning |
+===========================+=============================================+
| :const:`KQ_EV_ADD` | Adds or modifies an event |
+---------------------------+---------------------------------------------+... | Filter action.
+---------------------------+---------------------------------------------+
| Constant | Meaning |
+===========================+=============================================+
| :const:`KQ_EV_ADD` | Adds or modifies an event |
+---------------------------+---------------------------------------------+... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
6a006ab6-4f87-4595-b0e0-785d75006ae6 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,710 | supabase-export-v2 | 065ff04f0cf41756 | by a polling object. Just like the :meth:`register` method, *fd* can be an integer or an object with a :meth:`~io.IOBase.fileno` method that returns an integer.
Attempting to remove a file descriptor that was never registered causes a
:exc:`KeyError` exception to be raised. | trusted_official_docs | CPython Docs | by a polling object. Just like the :meth:`register` method, *fd* can be an integer or an object with a :meth:`~io.IOBase.fileno` method that returns an integer.
Attempting to remove a file descriptor that was never registered causes a
:exc:`KeyError` exception to be raised. | by a polling object. Just like the :meth:`register` method, *fd* can be an integer or an object with a :meth:`~io.IOBase.fileno` method that returns an integer.
Attempting to remove a file descriptor that was never registered causes a
:exc:`KeyError` exception to be raised. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
6d009596-7ce4-4f2d-9e55-c1976a79303b | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,747 | supabase-export-v2 | 28bd71da4d05e075 | :const:`KQ_FILTER_NETDEV` filter flags (not available on macOS):
+----------------------------+--------------------------------------------+
| Constant | Meaning |
+============================+============================================+
| :const:`KQ_NOTE_LINKUP` | link is up |
+----------------------------+-----... | trusted_official_docs | CPython Docs | :const:`KQ_FILTER_NETDEV` filter flags (not available on macOS):
+----------------------------+--------------------------------------------+
| Constant | Meaning |
+============================+============================================+
| :const:`KQ_NOTE_LINKUP` | link is up |
+----------------------------+-----... | :const:`KQ_FILTER_NETDEV` filter flags (not available on macOS):
+----------------------------+--------------------------------------------+
| Constant | Meaning |
+============================+============================================+
| :const:`KQ_NOTE_LINKUP` | link is up |
+----------------------------+-----... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
719af0ef-6235-4309-8c97-1e7e6776464c | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,745 | supabase-export-v2 | 6f3686a42cce8d87 | :const:`KQ_FILTER_PROC` filter flags:
+----------------------------+--------------------------------------------+
| Constant | Meaning |
+============================+============================================+
| :const:`KQ_NOTE_EXIT` | the process has exited |
+----------------------------+----------------------... | trusted_official_docs | CPython Docs | :const:`KQ_FILTER_PROC` filter flags:
+----------------------------+--------------------------------------------+
| Constant | Meaning |
+============================+============================================+
| :const:`KQ_NOTE_EXIT` | the process has exited |
+----------------------------+----------------------... | :const:`KQ_FILTER_PROC` filter flags:
+----------------------------+--------------------------------------------+
| Constant | Meaning |
+============================+============================================+
| :const:`KQ_NOTE_EXIT` | the process has exited |
+----------------------------+----------------------... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
76ae207e-3360-48bf-8af5-cb6fb3628991 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,635 | supabase-export-v2 | 15e1ded511696dba | that are ready: subsets of the first three arguments. When the time-out is reached without a file descriptor becoming ready, three empty lists are returned.
.. index::
single: socket() (in module socket)
single: popen() (in module os) | trusted_official_docs | CPython Docs | that are ready: subsets of the first three arguments. When the time-out is reached without a file descriptor becoming ready, three empty lists are returned.
.. index::
single: socket() (in module socket)
single: popen() (in module os) | that are ready: subsets of the first three arguments. When the time-out is reached without a file descriptor becoming ready, three empty lists are returned.
.. index::
single: socket() (in module socket)
single: popen() (in module os) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
781884b2-569d-431d-9460-7b76cc77828e | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,614 | supabase-export-v2 | 8474812b632d5479 | *flags* is deprecated and completely ignored. However, when supplied, its value must be ``0`` or ``select.EPOLL_CLOEXEC``, otherwise ``OSError`` is raised.
See the :ref:`epoll-objects` section below for the methods supported by
epolling objects. | trusted_official_docs | CPython Docs | *flags* is deprecated and completely ignored. However, when supplied, its value must be ``0`` or ``select.EPOLL_CLOEXEC``, otherwise ``OSError`` is raised.
See the :ref:`epoll-objects` section below for the methods supported by
epolling objects. | *flags* is deprecated and completely ignored. However, when supplied, its value must be ``0`` or ``select.EPOLL_CLOEXEC``, otherwise ``OSError`` is raised.
See the :ref:`epoll-objects` section below for the methods supported by
epolling objects. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7b168c6e-0e0b-4ae5-8064-696ce1517cf2 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,643 | supabase-export-v2 | 36856c2653e30696 | as ready for writing by :func:`~select.select`, :func:`!poll` or another interface in this module. This doesn't apply to other kinds of file-like objects such as sockets.
This value is guaranteed by POSIX to be at least 512. | trusted_official_docs | CPython Docs | as ready for writing by :func:`~select.select`, :func:`!poll` or another interface in this module. This doesn't apply to other kinds of file-like objects such as sockets.
This value is guaranteed by POSIX to be at least 512. | as ready for writing by :func:`~select.select`, :func:`!poll` or another interface in this module. This doesn't apply to other kinds of file-like objects such as sockets.
This value is guaranteed by POSIX to be at least 512. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7c1b1b04-6012-4331-bf2f-c7549935d829 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,712 | supabase-export-v2 | ef55136e94d78142 | .. method:: poll.poll([timeout])
Polls the set of registered file descriptors, and returns a possibly empty list
containing ``(fd, event)`` 2-tuples for the descriptors that have events or
errors to report. *fd* is the file descriptor, and *event* is a bitmask with
bits set for the reported events for that descripto... | trusted_official_docs | CPython Docs | .. method:: poll.poll([timeout])
Polls the set of registered file descriptors, and returns a possibly empty list
containing ``(fd, event)`` 2-tuples for the descriptors that have events or
errors to report. *fd* is the file descriptor, and *event* is a bitmask with
bits set for the reported events for that descripto... | .. method:: poll.poll([timeout])
Polls the set of registered file descriptors, and returns a possibly empty list
containing ``(fd, event)`` 2-tuples for the descriptors that have events or
errors to report. *fd* is the file descriptor, and *event* is a bitmask with
bits set for the reported events for that descripto... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7cd4b1fc-4e9e-45ac-b082-a10b3813c936 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,640 | supabase-export-v2 | 56f8b1411b59291e | a recomputed timeout when interrupted by a signal, except if the signal handler raises an exception (see :pep:`475` for the rationale), instead of raising :exc:`InterruptedError`.
.. versionchanged:: 3.15
Accepts any real number as *timeout*, not only integer or float. | trusted_official_docs | CPython Docs | a recomputed timeout when interrupted by a signal, except if the signal handler raises an exception (see :pep:`475` for the rationale), instead of raising :exc:`InterruptedError`.
.. versionchanged:: 3.15
Accepts any real number as *timeout*, not only integer or float. | a recomputed timeout when interrupted by a signal, except if the signal handler raises an exception (see :pep:`475` for the rationale), instead of raising :exc:`InterruptedError`.
.. versionchanged:: 3.15
Accepts any real number as *timeout*, not only integer or float. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8631147b-2c0f-4006-9c34-f2e48e335871 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,596 | supabase-export-v2 | 6ea5b5fc7ff6a47d | --------------
This module provides access to the :c:func:`!select` and :c:func:`!poll` functions
available in most operating systems, :c:func:`!devpoll` available on
Solaris and derivatives, :c:func:`!epoll` available on Linux 2.5+ and
:c:func:`!kqueue` available on most BSD. Note that on Windows, it only works for so... | trusted_official_docs | CPython Docs | --------------
This module provides access to the :c:func:`!select` and :c:func:`!poll` functions
available in most operating systems, :c:func:`!devpoll` available on
Solaris and derivatives, :c:func:`!epoll` available on Linux 2.5+ and
:c:func:`!kqueue` available on most BSD. Note that on Windows, it only works for so... | --------------
This module provides access to the :c:func:`!select` and :c:func:`!poll` functions
available in most operating systems, :c:func:`!devpoll` available on
Solaris and derivatives, :c:func:`!epoll` available on Linux 2.5+ and
:c:func:`!kqueue` available on most BSD. Note that on Windows, it only works for so... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
92306e3c-362e-4649-a5e2-56968f4cd9a2 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,707 | supabase-export-v2 | caa9505d8524f45a | .. method:: poll.modify(fd, eventmask)
Modifies an already registered fd. This has the same effect as
``register(fd, eventmask)``. Attempting to modify a file descriptor
that was never registered causes an :exc:`OSError` exception with errno
:const:`ENOENT` to be raised. | trusted_official_docs | CPython Docs | .. method:: poll.modify(fd, eventmask)
Modifies an already registered fd. This has the same effect as
``register(fd, eventmask)``. Attempting to modify a file descriptor
that was never registered causes an :exc:`OSError` exception with errno
:const:`ENOENT` to be raised. | .. method:: poll.modify(fd, eventmask)
Modifies an already registered fd. This has the same effect as
``register(fd, eventmask)``. Attempting to modify a file descriptor
that was never registered causes an :exc:`OSError` exception with errno
:const:`ENOENT` to be raised. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
97cee428-8df9-4623-a277-c395f8b77ee8 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,642 | supabase-export-v2 | e55e73a5c353efbb | .. data:: PIPE_BUF
The minimum number of bytes which can be written without blocking to a pipe
when the pipe has been reported as ready for writing by :func:`~select.select`,
:func:`!poll` or another interface in this module. This doesn't apply
to other kinds of file-like objects such as sockets. | trusted_official_docs | CPython Docs | .. data:: PIPE_BUF
The minimum number of bytes which can be written without blocking to a pipe
when the pipe has been reported as ready for writing by :func:`~select.select`,
:func:`!poll` or another interface in this module. This doesn't apply
to other kinds of file-like objects such as sockets. | .. data:: PIPE_BUF
The minimum number of bytes which can be written without blocking to a pipe
when the pipe has been reported as ready for writing by :func:`~select.select`,
:func:`!poll` or another interface in this module. This doesn't apply
to other kinds of file-like objects such as sockets. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9c1dc5b7-b1fa-41e0-9f7d-e9d77e03f57c | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,677 | supabase-export-v2 | 59981fe9ce46f1ee | | down writing half of connection. | +-------------------------+-----------------------------------------------+ | :const:`EPOLLRDNORM` | Equivalent to :const:`EPOLLIN` | +-------------------------+-----------------------------------------------+ | :const:`EPOLLRDBAND` | Priority data band can be read.
|
+------------... | trusted_official_docs | CPython Docs | | down writing half of connection. | +-------------------------+-----------------------------------------------+ | :const:`EPOLLRDNORM` | Equivalent to :const:`EPOLLIN` | +-------------------------+-----------------------------------------------+ | :const:`EPOLLRDBAND` | Priority data band can be read.
|
+------------... | | down writing half of connection. | +-------------------------+-----------------------------------------------+ | :const:`EPOLLRDNORM` | Equivalent to :const:`EPOLLIN` | +-------------------------+-----------------------------------------------+ | :const:`EPOLLRDBAND` | Priority data band can be read.
|
+------------... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9fbd5d60-9d1d-49df-812c-febb79da585f | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,668 | supabase-export-v2 | 3638ef40769b10b0 | .. method:: devpoll.poll([timeout])
Polls the set of registered file descriptors, and returns a possibly empty list
containing ``(fd, event)`` 2-tuples for the descriptors that have events or
errors to report. *fd* is the file descriptor, and *event* is a bitmask with
bits set for the reported events for that descri... | trusted_official_docs | CPython Docs | .. method:: devpoll.poll([timeout])
Polls the set of registered file descriptors, and returns a possibly empty list
containing ``(fd, event)`` 2-tuples for the descriptors that have events or
errors to report. *fd* is the file descriptor, and *event* is a bitmask with
bits set for the reported events for that descri... | .. method:: devpoll.poll([timeout])
Polls the set of registered file descriptors, and returns a possibly empty list
containing ``(fd, event)`` 2-tuples for the descriptors that have events or
errors to report. *fd* is the file descriptor, and *event* is a bitmask with
bits set for the reported events for that descri... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a053df70-1d83-4d86-b3f3-96427e99e649 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,669 | supabase-export-v2 | 9ee421fb08b17ab6 | wait for events before returning. If *timeout* is omitted, -1, or :const:`None`, the call will block until there is an event for this poll object.
.. versionchanged:: 3.5
The function is now retried with a recomputed timeout when interrupted by
a signal, except if the signal handler raises an exception (see
:pep:`47... | trusted_official_docs | CPython Docs | wait for events before returning. If *timeout* is omitted, -1, or :const:`None`, the call will block until there is an event for this poll object.
.. versionchanged:: 3.5
The function is now retried with a recomputed timeout when interrupted by
a signal, except if the signal handler raises an exception (see
:pep:`47... | wait for events before returning. If *timeout* is omitted, -1, or :const:`None`, the call will block until there is an event for this poll object.
.. versionchanged:: 3.5
The function is now retried with a recomputed timeout when interrupted by
a signal, except if the signal handler raises an exception (see
:pep:`47... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a386d0ca-20d3-445e-8104-77855bfd9a8a | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,613 | supabase-export-v2 | acdb9ce3516f3203 | the default. It is only used on older systems where :manpage:`epoll_create1(2)` is not available; otherwise it has no effect (though its value is still checked).
*flags* is deprecated and completely ignored. However, when supplied, its
value must be ``0`` or ``select.EPOLL_CLOEXEC``, otherwise ``OSError`` is
raised. | trusted_official_docs | CPython Docs | the default. It is only used on older systems where :manpage:`epoll_create1(2)` is not available; otherwise it has no effect (though its value is still checked).
*flags* is deprecated and completely ignored. However, when supplied, its
value must be ``0`` or ``select.EPOLL_CLOEXEC``, otherwise ``OSError`` is
raised. | the default. It is only used on older systems where :manpage:`epoll_create1(2)` is not available; otherwise it has no effect (though its value is still checked).
*flags* is deprecated and completely ignored. However, when supplied, its
value must be ``0`` or ``select.EPOLL_CLOEXEC``, otherwise ``OSError`` is
raised. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a42ba5b1-a4b1-4ac0-a6e8-e852bbec3355 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,619 | supabase-export-v2 | 9a779148aace72e0 | .. versionchanged:: 3.4 Support for the :keyword:`with` statement was added. The new file descriptor is now non-inheritable.
.. deprecated:: 3.4
The *flags* parameter. ``select.EPOLL_CLOEXEC`` is used by default now. Use :func:`os.set_inheritable` to make the file descriptor inheritable. | trusted_official_docs | CPython Docs | .. versionchanged:: 3.4 Support for the :keyword:`with` statement was added. The new file descriptor is now non-inheritable.
.. deprecated:: 3.4
The *flags* parameter. ``select.EPOLL_CLOEXEC`` is used by default now. Use :func:`os.set_inheritable` to make the file descriptor inheritable. | .. versionchanged:: 3.4 Support for the :keyword:`with` statement was added. The new file descriptor is now non-inheritable.
.. deprecated:: 3.4
The *flags* parameter. ``select.EPOLL_CLOEXEC`` is used by default now. Use :func:`os.set_inheritable` to make the file descriptor inheritable. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a6baadd5-bece-48fb-a700-4e22dd670dda | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,616 | supabase-export-v2 | 457945a80ce41f0f | objects support the context management protocol: when used in a :keyword:`with` statement, the new file descriptor is automatically closed at the end of the block.
The new file descriptor is :ref:`non-inheritable <fd_inheritance>`. | trusted_official_docs | CPython Docs | objects support the context management protocol: when used in a :keyword:`with` statement, the new file descriptor is automatically closed at the end of the block.
The new file descriptor is :ref:`non-inheritable <fd_inheritance>`. | objects support the context management protocol: when used in a :keyword:`with` statement, the new file descriptor is automatically closed at the end of the block.
The new file descriptor is :ref:`non-inheritable <fd_inheritance>`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a6eb93d3-8dbc-4371-9af4-44553a267c4e | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,598 | supabase-export-v2 | 7b3458cb4383619f | .. note::
The :mod:`selectors` module allows high-level and efficient I/O
multiplexing, built upon the :mod:`!select` module primitives. Users are
encouraged to use the :mod:`selectors` module instead, unless they want
precise control over the OS-level primitives used. | trusted_official_docs | CPython Docs | .. note::
The :mod:`selectors` module allows high-level and efficient I/O
multiplexing, built upon the :mod:`!select` module primitives. Users are
encouraged to use the :mod:`selectors` module instead, unless they want
precise control over the OS-level primitives used. | .. note::
The :mod:`selectors` module allows high-level and efficient I/O
multiplexing, built upon the :mod:`!select` module primitives. Users are
encouraged to use the :mod:`selectors` module instead, unless they want
precise control over the OS-level primitives used. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a87a3257-fd07-4c5d-a2e8-a0dd05968f01 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,713 | supabase-export-v2 | e169592fa176c4be | wait for events before returning. If *timeout* is omitted, negative, or :const:`None`, the call will block until there is an event for this poll object.
.. versionchanged:: 3.5
The function is now retried with a recomputed timeout when interrupted by
a signal, except if the signal handler raises an exception (see
:p... | trusted_official_docs | CPython Docs | wait for events before returning. If *timeout* is omitted, negative, or :const:`None`, the call will block until there is an event for this poll object.
.. versionchanged:: 3.5
The function is now retried with a recomputed timeout when interrupted by
a signal, except if the signal handler raises an exception (see
:p... | wait for events before returning. If *timeout* is omitted, negative, or :const:`None`, the call will block until there is an event for this poll object.
.. versionchanged:: 3.5
The function is now retried with a recomputed timeout when interrupted by
a signal, except if the signal handler raises an exception (see
:p... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
acd13aed-d452-4a2d-99a3-3befacf67923 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,697 | supabase-export-v2 | e3064e481a4fe273 | events. If *timeout* is given, it specifies the length of time in seconds (may be non-integer) which the system will wait for events before returning.
.. versionchanged:: 3.5
The function is now retried with a recomputed timeout when interrupted by
a signal, except if the signal handler raises an exception (see
:pep... | trusted_official_docs | CPython Docs | events. If *timeout* is given, it specifies the length of time in seconds (may be non-integer) which the system will wait for events before returning.
.. versionchanged:: 3.5
The function is now retried with a recomputed timeout when interrupted by
a signal, except if the signal handler raises an exception (see
:pep... | events. If *timeout* is given, it specifies the length of time in seconds (may be non-integer) which the system will wait for events before returning.
.. versionchanged:: 3.5
The function is now retried with a recomputed timeout when interrupted by
a signal, except if the signal handler raises an exception (see
:pep... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
afea0cb5-579a-4cdc-b300-9210128f3d5f | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,606 | supabase-export-v2 | b173024d0acc14f5 | (Only supported on Solaris and derivatives.) Returns a ``/dev/poll`` polling object; see section :ref:`devpoll-objects` below for the methods supported by devpoll objects.
:c:func:`!devpoll` objects are linked to the number of file
descriptors allowed at the time of instantiation. If your program
reduces this value, ... | trusted_official_docs | CPython Docs | (Only supported on Solaris and derivatives.) Returns a ``/dev/poll`` polling object; see section :ref:`devpoll-objects` below for the methods supported by devpoll objects.
:c:func:`!devpoll` objects are linked to the number of file
descriptors allowed at the time of instantiation. If your program
reduces this value, ... | (Only supported on Solaris and derivatives.) Returns a ``/dev/poll`` polling object; see section :ref:`devpoll-objects` below for the methods supported by devpoll objects.
:c:func:`!devpoll` objects are linked to the number of file
descriptors allowed at the time of instantiation. If your program
reduces this value, ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c09af7fa-06d3-4875-97f3-18549777af01 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,743 | supabase-export-v2 | 24c97029f1c9b27f | :const:`KQ_FILTER_VNODE` filter flags:
+----------------------------+--------------------------------------------+
| Constant | Meaning |
+============================+============================================+
| :const:`KQ_NOTE_DELETE` | *unlink()* was called |
+----------------------------+--------------------... | trusted_official_docs | CPython Docs | :const:`KQ_FILTER_VNODE` filter flags:
+----------------------------+--------------------------------------------+
| Constant | Meaning |
+============================+============================================+
| :const:`KQ_NOTE_DELETE` | *unlink()* was called |
+----------------------------+--------------------... | :const:`KQ_FILTER_VNODE` filter flags:
+----------------------------+--------------------------------------------+
| Constant | Meaning |
+============================+============================================+
| :const:`KQ_NOTE_DELETE` | *unlink()* was called |
+----------------------------+--------------------... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c18bbb49-7a30-477f-bbb6-e2e997d60ba7 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,700 | supabase-export-v2 | 0e21612c8cd238e1 | Polling Objects ---------------
The :c:func:`!poll` system call, supported on most Unix systems, provides better
scalability for network servers that service many, many clients at the same
time. :c:func:`!poll` scales better because the system call only requires listing
the file descriptors of interest, while :c:func:`... | trusted_official_docs | CPython Docs | Polling Objects ---------------
The :c:func:`!poll` system call, supported on most Unix systems, provides better
scalability for network servers that service many, many clients at the same
time. :c:func:`!poll` scales better because the system call only requires listing
the file descriptors of interest, while :c:func:`... | Polling Objects ---------------
The :c:func:`!poll` system call, supported on most Unix systems, provides better
scalability for network servers that service many, many clients at the same
time. :c:func:`!poll` scales better because the system call only requires listing
the file descriptors of interest, while :c:func:`... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c3fd79e1-afcb-47e3-910e-413d785d8f32 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,634 | supabase-export-v2 | cc1800fe2b5280fc | omitted or ``None``, the function blocks until at least one file descriptor is ready. A time-out value of zero specifies a poll and never blocks.
The return value is a triple of lists of objects that are ready: subsets of the
first three arguments. When the time-out is reached without a file descriptor
becoming ready... | trusted_official_docs | CPython Docs | omitted or ``None``, the function blocks until at least one file descriptor is ready. A time-out value of zero specifies a poll and never blocks.
The return value is a triple of lists of objects that are ready: subsets of the
first three arguments. When the time-out is reached without a file descriptor
becoming ready... | omitted or ``None``, the function blocks until at least one file descriptor is ready. A time-out value of zero specifies a poll and never blocks.
The return value is a triple of lists of objects that are ready: subsets of the
first three arguments. When the time-out is reached without a file descriptor
becoming ready... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
cb367fc2-f105-483a-9d4c-2dd97953a4dc | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,704 | supabase-export-v2 | aace4be0c00ff07a | constants :const:`POLLIN`, :const:`POLLPRI`, and :const:`POLLOUT`, described in the table below. If not specified, the default value used will check for all 3 types of events.
+-------------------+------------------------------------------+
| Constant | Meaning |
+===================+=================================... | trusted_official_docs | CPython Docs | constants :const:`POLLIN`, :const:`POLLPRI`, and :const:`POLLOUT`, described in the table below. If not specified, the default value used will check for all 3 types of events.
+-------------------+------------------------------------------+
| Constant | Meaning |
+===================+=================================... | constants :const:`POLLIN`, :const:`POLLPRI`, and :const:`POLLOUT`, described in the table below. If not specified, the default value used will check for all 3 types of events.
+-------------------+------------------------------------------+
| Constant | Meaning |
+===================+=================================... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d2249b95-949e-4f4d-af9c-d513a604ac81 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,631 | supabase-export-v2 | 243a37f20bd55bc7 | .. function:: select(rlist, wlist, xlist, timeout=None)
This is a straightforward interface to the Unix :c:func:`!select` system call. The first three arguments are iterables of 'waitable objects': either
integers representing file descriptors or objects with a parameterless method
named :meth:`~io.IOBase.fileno` ret... | trusted_official_docs | CPython Docs | .. function:: select(rlist, wlist, xlist, timeout=None)
This is a straightforward interface to the Unix :c:func:`!select` system call. The first three arguments are iterables of 'waitable objects': either
integers representing file descriptors or objects with a parameterless method
named :meth:`~io.IOBase.fileno` ret... | .. function:: select(rlist, wlist, xlist, timeout=None)
This is a straightforward interface to the Unix :c:func:`!select` system call. The first three arguments are iterables of 'waitable objects': either
integers representing file descriptors or objects with a parameterless method
named :meth:`~io.IOBase.fileno` ret... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d3c1a555-2cfc-4a1d-9ab2-de032b90c6a3 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,678 | supabase-export-v2 | ef7ed71a98313778 | :const:`EPOLLWRBAND` | Priority data may be written. | +-------------------------+-----------------------------------------------+ | :const:`EPOLLMSG` | Ignored. | +-------------------------+-----------------------------------------------+ | :const:`EPOLLWAKEUP` | Prevents sleep during event waiting. | +---------------... | trusted_official_docs | CPython Docs | :const:`EPOLLWRBAND` | Priority data may be written. | +-------------------------+-----------------------------------------------+ | :const:`EPOLLMSG` | Ignored. | +-------------------------+-----------------------------------------------+ | :const:`EPOLLWAKEUP` | Prevents sleep during event waiting. | +---------------... | :const:`EPOLLWRBAND` | Priority data may be written. | +-------------------------+-----------------------------------------------+ | :const:`EPOLLMSG` | Ignored. | +-------------------------+-----------------------------------------------+ | :const:`EPOLLWAKEUP` | Prevents sleep during event waiting. | +---------------... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d89f339f-5e8f-46a0-96f6-a448cfb74c67 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,632 | supabase-export-v2 | 33a5f66d5eef5144 | first three arguments are iterables of 'waitable objects': either integers representing file descriptors or objects with a parameterless method named :meth:`~io.IOBase.fileno` returning such an integer:
* *rlist*: wait until ready for reading
* *wlist*: wait until ready for writing
* *xlist*: wait for an "exceptional... | trusted_official_docs | CPython Docs | first three arguments are iterables of 'waitable objects': either integers representing file descriptors or objects with a parameterless method named :meth:`~io.IOBase.fileno` returning such an integer:
* *rlist*: wait until ready for reading
* *wlist*: wait until ready for writing
* *xlist*: wait for an "exceptional... | first three arguments are iterables of 'waitable objects': either integers representing file descriptors or objects with a parameterless method named :meth:`~io.IOBase.fileno` returning such an integer:
* *rlist*: wait until ready for reading
* *wlist*: wait until ready for writing
* *xlist*: wait for an "exceptional... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
eaf85367-80e5-4906-93cd-cee9a2f3bb30 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,696 | supabase-export-v2 | 445b82a372dd63b4 | .. method:: epoll.poll(timeout=None, maxevents=-1)
Wait for events. If *timeout* is given, it specifies the length of time in seconds
(may be non-integer) which the system will wait for events before returning. | trusted_official_docs | CPython Docs | .. method:: epoll.poll(timeout=None, maxevents=-1)
Wait for events. If *timeout* is given, it specifies the length of time in seconds
(may be non-integer) which the system will wait for events before returning. | .. method:: epoll.poll(timeout=None, maxevents=-1)
Wait for events. If *timeout* is given, it specifies the length of time in seconds
(may be non-integer) which the system will wait for events before returning. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ee756a4d-9717-4a3c-ab87-944a7c856ba9 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,623 | supabase-export-v2 | e296b3957133d48c | .. function:: poll()
(Not supported by all operating systems.) Returns a polling object, which
supports registering and unregistering file descriptors, and then polling them
for I/O events; see section :ref:`poll-objects` below for the methods supported
by polling objects. | trusted_official_docs | CPython Docs | .. function:: poll()
(Not supported by all operating systems.) Returns a polling object, which
supports registering and unregistering file descriptors, and then polling them
for I/O events; see section :ref:`poll-objects` below for the methods supported
by polling objects. | .. function:: poll()
(Not supported by all operating systems.) Returns a polling object, which
supports registering and unregistering file descriptors, and then polling them
for I/O events; see section :ref:`poll-objects` below for the methods supported
by polling objects. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f5801432-f15b-4fa9-8c47-c1ffa4cad696 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,633 | supabase-export-v2 | d18e6a9f8b045ebd | *wlist*: wait until ready for writing * *xlist*: wait for an "exceptional condition" (see the manual page for what your system considers such a condition)
Empty iterables are allowed, but acceptance of three empty iterables is
platform-dependent. (It is known to work on Unix but not on Windows.) The
optional *timeout... | trusted_official_docs | CPython Docs | *wlist*: wait until ready for writing * *xlist*: wait for an "exceptional condition" (see the manual page for what your system considers such a condition)
Empty iterables are allowed, but acceptance of three empty iterables is
platform-dependent. (It is known to work on Unix but not on Windows.) The
optional *timeout... | *wlist*: wait until ready for writing * *xlist*: wait for an "exceptional condition" (see the manual page for what your system considers such a condition)
Empty iterables are allowed, but acceptance of three empty iterables is
platform-dependent. (It is known to work on Unix but not on Windows.) The
optional *timeout... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f67362e3-0035-44d4-a774-e14ff63e119e | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,612 | supabase-export-v2 | 6a6197636fe22acb | (Only supported on Linux 2.5.44 and newer.) Return an edge polling object, which can be used as Edge or Level Triggered interface for I/O events.
*sizehint* informs epoll about the expected number of events to be
registered. It must be positive, or ``-1`` to use the default. It is only
used on older systems where :ma... | trusted_official_docs | CPython Docs | (Only supported on Linux 2.5.44 and newer.) Return an edge polling object, which can be used as Edge or Level Triggered interface for I/O events.
*sizehint* informs epoll about the expected number of events to be
registered. It must be positive, or ``-1`` to use the default. It is only
used on older systems where :ma... | (Only supported on Linux 2.5.44 and newer.) Return an edge polling object, which can be used as Edge or Level Triggered interface for I/O events.
*sizehint* informs epoll about the expected number of events to be
registered. It must be positive, or ``-1`` to use the default. It is only
used on older systems where :ma... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fb21e33b-7c7b-4220-bdb3-6027f3bfc005 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,638 | supabase-export-v2 | 1c6b725c9427bfa6 | .. index:: single: WinSock
File objects on Windows are not acceptable, but sockets are. On Windows,
the underlying :c:func:`!select` function is provided by the WinSock
library, and does not handle file descriptors that don't originate from
WinSock. | trusted_official_docs | CPython Docs | .. index:: single: WinSock
File objects on Windows are not acceptable, but sockets are. On Windows,
the underlying :c:func:`!select` function is provided by the WinSock
library, and does not handle file descriptors that don't originate from
WinSock. | .. index:: single: WinSock
File objects on Windows are not acceptable, but sockets are. On Windows,
the underlying :c:func:`!select` function is provided by the WinSock
library, and does not handle file descriptors that don't originate from
WinSock. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fb4f6354-abbc-46cd-828e-684aca8e90be | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,675 | supabase-export-v2 | 76789a631b49a53b | :const:`EPOLLOUT` | Available for write | +-------------------------+-----------------------------------------------+ | :const:`EPOLLPRI` | Urgent data for read | +-------------------------+-----------------------------------------------+ | :const:`EPOLLERR` | Error condition happened on the assoc.
fd |
+-------------... | trusted_official_docs | CPython Docs | :const:`EPOLLOUT` | Available for write | +-------------------------+-----------------------------------------------+ | :const:`EPOLLPRI` | Urgent data for read | +-------------------------+-----------------------------------------------+ | :const:`EPOLLERR` | Error condition happened on the assoc.
fd |
+-------------... | :const:`EPOLLOUT` | Available for write | +-------------------------+-----------------------------------------------+ | :const:`EPOLLPRI` | Urgent data for read | +-------------------------+-----------------------------------------------+ | :const:`EPOLLERR` | Error condition happened on the assoc.
fd |
+-------------... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fdb36e65-c3d2-443a-8580-4ee58f642ec3 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,636 | supabase-export-v2 | 5779075ea74b6066 | .. index:: single: socket() (in module socket) single: popen() (in module os)
Among the acceptable object types in the iterables are Python :term:`file
objects <file object>` (e.g. ``sys.stdin``, or objects returned by
:func:`open` or :func:`os.popen`), socket objects returned by
:func:`socket.socket`. You may also ... | trusted_official_docs | CPython Docs | .. index:: single: socket() (in module socket) single: popen() (in module os)
Among the acceptable object types in the iterables are Python :term:`file
objects <file object>` (e.g. ``sys.stdin``, or objects returned by
:func:`open` or :func:`os.popen`), socket objects returned by
:func:`socket.socket`. You may also ... | .. index:: single: socket() (in module socket) single: popen() (in module os)
Among the acceptable object types in the iterables are Python :term:`file
objects <file object>` (e.g. ``sys.stdin``, or objects returned by
:func:`open` or :func:`os.popen`), socket objects returned by
:func:`socket.socket`. You may also ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fe336b8a-ed30-47a3-b2de-c6c93ecb157e | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,735 | supabase-export-v2 | 1d98768f22127847 | Name of the kernel filter.
+---------------------------+---------------------------------------------+
| Constant | Meaning |
+===========================+=============================================+
| :const:`KQ_FILTER_READ` | Takes a descriptor and returns whenever |
| | there is data available to read |
+----... | trusted_official_docs | CPython Docs | Name of the kernel filter.
+---------------------------+---------------------------------------------+
| Constant | Meaning |
+===========================+=============================================+
| :const:`KQ_FILTER_READ` | Takes a descriptor and returns whenever |
| | there is data available to read |
+----... | Name of the kernel filter.
+---------------------------+---------------------------------------------+
| Constant | Meaning |
+===========================+=============================================+
| :const:`KQ_FILTER_READ` | Takes a descriptor and returns whenever |
| | there is data available to read |
+----... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fe5fa85d-9e57-4bbd-bd66-23bf30b1d943 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,676 | supabase-export-v2 | 41cac56a8737012c | the fd is internally disabled | +-------------------------+-----------------------------------------------+ | :const:`EPOLLEXCLUSIVE` | Wake only one epoll object when the | | | associated fd has an event.
The default (if |
| | this flag is not set) is to wake all epoll |
| | objects polling on a fd. |
+------------... | trusted_official_docs | CPython Docs | the fd is internally disabled | +-------------------------+-----------------------------------------------+ | :const:`EPOLLEXCLUSIVE` | Wake only one epoll object when the | | | associated fd has an event.
The default (if |
| | this flag is not set) is to wake all epoll |
| | objects polling on a fd. |
+------------... | the fd is internally disabled | +-------------------------+-----------------------------------------------+ | :const:`EPOLLEXCLUSIVE` | Wake only one epoll object when the | | | associated fd has an event.
The default (if |
| | this flag is not set) is to wake all epoll |
| | objects polling on a fd. |
+------------... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ff4b7193-75a4-4895-bdc1-72e25a6b7128 | CPython Docs | file://datasets/cpython/Doc/library/select.rst | unknown | f861c210-8b23-48dd-a2b5-65768e2dd9ae | 14,703 | supabase-export-v2 | 09cfa0674f96273d | integer, or an object with a :meth:`~io.IOBase.fileno` method that returns an integer. File objects implement :meth:`!fileno`, so they can also be used as the argument.
*eventmask* is an optional bitmask describing the type of events you want to
check for, and can be a combination of the constants :const:`POLLIN`,
:c... | trusted_official_docs | CPython Docs | integer, or an object with a :meth:`~io.IOBase.fileno` method that returns an integer. File objects implement :meth:`!fileno`, so they can also be used as the argument.
*eventmask* is an optional bitmask describing the type of events you want to
check for, and can be a combination of the constants :const:`POLLIN`,
:c... | integer, or an object with a :meth:`~io.IOBase.fileno` method that returns an integer. File objects implement :meth:`!fileno`, so they can also be used as the argument.
*eventmask* is an optional bitmask describing the type of events you want to
check for, and can be a combination of the constants :const:`POLLIN`,
:c... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0030debf-5482-4ae1-b88c-f103fdfb7bd2 | CPython Docs | file://datasets/cpython/Doc/library/configparser.rst | unknown | 1c1a2652-09ff-48b4-9ab2-aae53e157cab | 14,870 | supabase-export-v2 | 19b0eeca8c2b3efc | .. doctest::
>>> parser = configparser.ConfigParser()
>>> parser.read_dict({'section1': {'key1': 'value1',
... 'key2': 'value2',
... 'key3': 'value3'},
... 'section2': {'keyA': 'valueA',
... 'keyB': 'valueB',
... 'keyC': 'valueC'},
... 'section3': {'foo': 'x',
... 'bar': 'y',
... 'baz': 'z'}
... })
>>> parse... | trusted_official_docs | CPython Docs | .. doctest::
>>> parser = configparser.ConfigParser()
>>> parser.read_dict({'section1': {'key1': 'value1',
... 'key2': 'value2',
... 'key3': 'value3'},
... 'section2': {'keyA': 'valueA',
... 'keyB': 'valueB',
... 'keyC': 'valueC'},
... 'section3': {'foo': 'x',
... 'bar': 'y',
... 'baz': 'z'}
... })
>>> parse... | .. doctest::
>>> parser = configparser.ConfigParser()
>>> parser.read_dict({'section1': {'key1': 'value1',
... 'key2': 'value2',
... 'key3': 'value3'},
... 'section2': {'keyA': 'valueA',
... 'keyB': 'valueB',
... 'keyC': 'valueC'},
... 'section3': {'foo': 'x',
... 'bar': 'y',
... 'baz': 'z'}
... })
>>> parse... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0336d96d-dcfa-4ec9-aeb8-9b60d21ca1e7 | CPython Docs | file://datasets/cpython/Doc/library/configparser.rst | unknown | 1c1a2652-09ff-48b4-9ab2-aae53e157cab | 15,012 | supabase-export-v2 | e886c9b83923bfe3 | A convenience method which coerces the *option* in the specified *section* to a floating-point number. See :meth:`get` for explanation of *raw*, *vars* and *fallback*.
.. method:: getboolean(section, option, *, raw=False, vars=None[, fallback]) | trusted_official_docs | CPython Docs | A convenience method which coerces the *option* in the specified *section* to a floating-point number. See :meth:`get` for explanation of *raw*, *vars* and *fallback*.
.. method:: getboolean(section, option, *, raw=False, vars=None[, fallback]) | A convenience method which coerces the *option* in the specified *section* to a floating-point number. See :meth:`get` for explanation of *raw*, *vars* and *fallback*.
.. method:: getboolean(section, option, *, raw=False, vars=None[, fallback]) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
064301ac-b06b-4e64-a8a2-35a68f249038 | CPython Docs | file://datasets/cpython/Doc/library/configparser.rst | unknown | 1c1a2652-09ff-48b4-9ab2-aae53e157cab | 15,054 | supabase-export-v2 | f5096f996d99b057 | parameters set to true) for *internal* storage of non-string values, full functionality (including interpolation and output to files) can only be achieved using string values.
This method lets users assign non-string values to keys internally. This
behaviour is unsupported and will cause errors when attempting to writ... | trusted_official_docs | CPython Docs | parameters set to true) for *internal* storage of non-string values, full functionality (including interpolation and output to files) can only be achieved using string values.
This method lets users assign non-string values to keys internally. This
behaviour is unsupported and will cause errors when attempting to writ... | parameters set to true) for *internal* storage of non-string values, full functionality (including interpolation and output to files) can only be achieved using string values.
This method lets users assign non-string values to keys internally. This
behaviour is unsupported and will cause errors when attempting to writ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0741c6e5-4ea6-4416-8b21-4004dd7a3325 | CPython Docs | file://datasets/cpython/Doc/library/configparser.rst | unknown | 1c1a2652-09ff-48b4-9ab2-aae53e157cab | 14,875 | supabase-export-v2 | ffeb14089ebf41f9 | ... skip-external-locking ... old_passwords = 1 ... skip-bdb ... # we don't need ACID today ... skip-innodb ... """ >>> config = configparser.ConfigParser(allow_no_value=True) >>> config.read_string(sample_config)
>>> # Settings with values are treated as before:
>>> config["mysqld"]["user"]
'mysql' | trusted_official_docs | CPython Docs | ... skip-external-locking ... old_passwords = 1 ... skip-bdb ... # we don't need ACID today ... skip-innodb ... """ >>> config = configparser.ConfigParser(allow_no_value=True) >>> config.read_string(sample_config)
>>> # Settings with values are treated as before:
>>> config["mysqld"]["user"]
'mysql' | ... skip-external-locking ... old_passwords = 1 ... skip-bdb ... # we don't need ACID today ... skip-innodb ... """ >>> config = configparser.ConfigParser(allow_no_value=True) >>> config.read_string(sample_config)
>>> # Settings with values are treated as before:
>>> config["mysqld"]["user"]
'mysql' | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
091851d2-ec2c-4975-9a05-82de7b5dfa42 | CPython Docs | file://datasets/cpython/Doc/library/configparser.rst | unknown | 1c1a2652-09ff-48b4-9ab2-aae53e157cab | 15,063 | supabase-export-v2 | 5181a311ea119372 | .. exception:: DuplicateOptionError
Exception raised by strict parsers if a single option appears twice during
reading from a single file, string or dictionary. This catches misspellings
and case sensitivity-related errors, e.g. a dictionary may have two keys
representing the same case-insensitive configuration key. | trusted_official_docs | CPython Docs | .. exception:: DuplicateOptionError
Exception raised by strict parsers if a single option appears twice during
reading from a single file, string or dictionary. This catches misspellings
and case sensitivity-related errors, e.g. a dictionary may have two keys
representing the same case-insensitive configuration key. | .. exception:: DuplicateOptionError
Exception raised by strict parsers if a single option appears twice during
reading from a single file, string or dictionary. This catches misspellings
and case sensitivity-related errors, e.g. a dictionary may have two keys
representing the same case-insensitive configuration key. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
09412cb1-4d63-44ef-81e6-285f809377c8 | CPython Docs | file://datasets/cpython/Doc/library/configparser.rst | unknown | 1c1a2652-09ff-48b4-9ab2-aae53e157cab | 14,904 | supabase-export-v2 | b114227bd59a9c3b | the name of this method starts with ``get``, it will be available on all section proxies, in the dict-compatible form (see the ``getdecimal()`` example above).
More advanced customization may be achieved by overriding default values of
these parser attributes. The defaults are defined on the classes, so they may
be ove... | trusted_official_docs | CPython Docs | the name of this method starts with ``get``, it will be available on all section proxies, in the dict-compatible form (see the ``getdecimal()`` example above).
More advanced customization may be achieved by overriding default values of
these parser attributes. The defaults are defined on the classes, so they may
be ove... | the name of this method starts with ``get``, it will be available on all section proxies, in the dict-compatible form (see the ``getdecimal()`` example above).
More advanced customization may be achieved by overriding default values of
these parser attributes. The defaults are defined on the classes, so they may
be ove... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0bbdf0a3-2bc9-4ce9-b94a-d6049cc43ce1 | CPython Docs | file://datasets/cpython/Doc/library/configparser.rst | unknown | 1c1a2652-09ff-48b4-9ab2-aae53e157cab | 14,946 | supabase-export-v2 | d7130d4055a23185 | # New instance with 'bar' and 'baz' defaulting to 'Life' and 'hard' each config = configparser.ConfigParser({'bar': 'Life', 'baz': 'hard'}) config.read('example.cfg')
print(config.get('Section1', 'foo')) # -> "Python is fun!"
config.remove_option('Section1', 'bar')
config.remove_option('Section1', 'baz')
print(confi... | trusted_official_docs | CPython Docs | # New instance with 'bar' and 'baz' defaulting to 'Life' and 'hard' each config = configparser.ConfigParser({'bar': 'Life', 'baz': 'hard'}) config.read('example.cfg')
print(config.get('Section1', 'foo')) # -> "Python is fun!"
config.remove_option('Section1', 'bar')
config.remove_option('Section1', 'baz')
print(confi... | # New instance with 'bar' and 'baz' defaulting to 'Life' and 'hard' each config = configparser.ConfigParser({'bar': 'Life', 'baz': 'hard'}) config.read('example.cfg')
print(config.get('Section1', 'foo')) # -> "Python is fun!"
config.remove_option('Section1', 'bar')
config.remove_option('Section1', 'baz')
print(confi... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0bd964fc-7fdd-4aeb-819e-cefa53c6f5ef | CPython Docs | file://datasets/cpython/Doc/library/configparser.rst | unknown | 1c1a2652-09ff-48b4-9ab2-aae53e157cab | 14,883 | supabase-export-v2 | f74229b7a968a274 | * *inline_comment_prefixes*, default value: ``None``
Comment prefixes are strings that indicate the start of a valid comment within
a config file. *comment_prefixes* are used only on otherwise empty lines
(optionally indented) whereas *inline_comment_prefixes* can be used after
every valid value (e.g. section names,... | trusted_official_docs | CPython Docs | * *inline_comment_prefixes*, default value: ``None``
Comment prefixes are strings that indicate the start of a valid comment within
a config file. *comment_prefixes* are used only on otherwise empty lines
(optionally indented) whereas *inline_comment_prefixes* can be used after
every valid value (e.g. section names,... | * *inline_comment_prefixes*, default value: ``None``
Comment prefixes are strings that indicate the start of a valid comment within
a config file. *comment_prefixes* are used only on otherwise empty lines
(optionally indented) whereas *inline_comment_prefixes* can be used after
every valid value (e.g. section names,... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0cd71ca6-938d-45db-9cca-9cd8f5bf2dd5 | CPython Docs | file://datasets/cpython/Doc/library/configparser.rst | unknown | 1c1a2652-09ff-48b4-9ab2-aae53e157cab | 14,957 | supabase-export-v2 | 8a934eff6bd98752 | callable implementing the conversion from string to the desired datatype. Every converter gets its own corresponding :meth:`!get*` method on the parser object and section proxies.
When *allow_unnamed_section* is ``True`` (default: ``False``),
the first section name can be omitted. See the
`"Unnamed Sections" section ... | trusted_official_docs | CPython Docs | callable implementing the conversion from string to the desired datatype. Every converter gets its own corresponding :meth:`!get*` method on the parser object and section proxies.
When *allow_unnamed_section* is ``True`` (default: ``False``),
the first section name can be omitted. See the
`"Unnamed Sections" section ... | callable implementing the conversion from string to the desired datatype. Every converter gets its own corresponding :meth:`!get*` method on the parser object and section proxies.
When *allow_unnamed_section* is ``True`` (default: ``False``),
the first section name can be omitted. See the
`"Unnamed Sections" section ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0dcb9888-6a6d-4538-bc41-b43a088657fb | CPython Docs | file://datasets/cpython/Doc/library/configparser.rst | unknown | 1c1a2652-09ff-48b4-9ab2-aae53e157cab | 15,001 | supabase-export-v2 | 9f955c0ed304cc5d | in the section. If the used dictionary type preserves order, sections and their keys will be added in order. Values are automatically converted to strings.
Optional argument *source* specifies a context-specific name of the
dictionary passed. If not given, ``<dict>`` is used. | trusted_official_docs | CPython Docs | in the section. If the used dictionary type preserves order, sections and their keys will be added in order. Values are automatically converted to strings.
Optional argument *source* specifies a context-specific name of the
dictionary passed. If not given, ``<dict>`` is used. | in the section. If the used dictionary type preserves order, sections and their keys will be added in order. Values are automatically converted to strings.
Optional argument *source* specifies a context-specific name of the
dictionary passed. If not given, ``<dict>`` is used. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0de18233-b869-4e5c-8730-da8ffc869877 | CPython Docs | file://datasets/cpython/Doc/library/configparser.rst | unknown | 1c1a2652-09ff-48b4-9ab2-aae53e157cab | 14,861 | supabase-export-v2 | dc6fb89c8093b86d | styles available. The default functionality is mainly dictated by historical background and it's very likely that you will want to customize some of the features.
The most common way to change the way a specific config parser works is to use
the :meth:`!__init__` options: | trusted_official_docs | CPython Docs | styles available. The default functionality is mainly dictated by historical background and it's very likely that you will want to customize some of the features.
The most common way to change the way a specific config parser works is to use
the :meth:`!__init__` options: | styles available. The default functionality is mainly dictated by historical background and it's very likely that you will want to customize some of the features.
The most common way to change the way a specific config parser works is to use
the :meth:`!__init__` options: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0eb8d3e7-7d05-4e28-90a3-80081c7bb641 | CPython Docs | file://datasets/cpython/Doc/library/configparser.rst | unknown | 1c1a2652-09ff-48b4-9ab2-aae53e157cab | 14,967 | supabase-export-v2 | bee282e89a9da019 | .. versionchanged:: 3.8 The default *dict_type* is :class:`dict`, since it now preserves insertion order.
.. versionchanged:: 3.13
Raise a :exc:`MultilineContinuationError` when *allow_no_value* is
``True``, and a key without a value is continued with an indented line. | trusted_official_docs | CPython Docs | .. versionchanged:: 3.8 The default *dict_type* is :class:`dict`, since it now preserves insertion order.
.. versionchanged:: 3.13
Raise a :exc:`MultilineContinuationError` when *allow_no_value* is
``True``, and a key without a value is continued with an indented line. | .. versionchanged:: 3.8 The default *dict_type* is :class:`dict`, since it now preserves insertion order.
.. versionchanged:: 3.13
Raise a :exc:`MultilineContinuationError` when *allow_no_value* is
``True``, and a key without a value is continued with an indented line. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0f378ca9-b98d-4b25-a3c5-9c47362f9a98 | CPython Docs | file://datasets/cpython/Doc/library/configparser.rst | unknown | 1c1a2652-09ff-48b4-9ab2-aae53e157cab | 14,857 | supabase-export-v2 | 55f5f15a0e278001 | argument is **not** a fallback value. Note however that the section-level ``get()`` methods are compatible both with the mapping protocol and the classic configparser API.
* ``parser.items()`` is compatible with the mapping protocol (returns a list of
*section_name*, *section_proxy* pairs including the DEFAULTSECT). H... | trusted_official_docs | CPython Docs | argument is **not** a fallback value. Note however that the section-level ``get()`` methods are compatible both with the mapping protocol and the classic configparser API.
* ``parser.items()`` is compatible with the mapping protocol (returns a list of
*section_name*, *section_proxy* pairs including the DEFAULTSECT). H... | argument is **not** a fallback value. Note however that the section-level ``get()`` methods are compatible both with the mapping protocol and the classic configparser API.
* ``parser.items()`` is compatible with the mapping protocol (returns a list of
*section_name*, *section_proxy* pairs including the DEFAULTSECT). H... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1724deac-ef3e-4d55-ae1f-88acb8545132 | CPython Docs | file://datasets/cpython/Doc/library/configparser.rst | unknown | 1c1a2652-09ff-48b4-9ab2-aae53e157cab | 14,784 | supabase-export-v2 | 9b6d978f70cdee80 | Supported Datatypes -------------------
Config parsers do not guess datatypes of values in configuration files, always
storing them internally as strings. This means that if you need other
datatypes, you should convert on your own: | trusted_official_docs | CPython Docs | Supported Datatypes -------------------
Config parsers do not guess datatypes of values in configuration files, always
storing them internally as strings. This means that if you need other
datatypes, you should convert on your own: | Supported Datatypes -------------------
Config parsers do not guess datatypes of values in configuration files, always
storing them internally as strings. This means that if you need other
datatypes, you should convert on your own: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
173204a0-b09c-4864-8156-082be65711b2 | CPython Docs | file://datasets/cpython/Doc/library/configparser.rst | unknown | 1c1a2652-09ff-48b4-9ab2-aae53e157cab | 14,956 | supabase-export-v2 | 2c1a7f13cb0ec67b | reference. For example, using the default implementation of :meth:`optionxform` (which converts option names to lower case), the values ``foo %(bar)s`` and ``foo %(BAR)s`` are equivalent.
When *converters* is given, it should be a dictionary where each key
represents the name of a type converter and each value is a ca... | trusted_official_docs | CPython Docs | reference. For example, using the default implementation of :meth:`optionxform` (which converts option names to lower case), the values ``foo %(bar)s`` and ``foo %(BAR)s`` are equivalent.
When *converters* is given, it should be a dictionary where each key
represents the name of a type converter and each value is a ca... | reference. For example, using the default implementation of :meth:`optionxform` (which converts option names to lower case), the values ``foo %(bar)s`` and ``foo %(BAR)s`` are equivalent.
When *converters* is given, it should be a dictionary where each key
represents the name of a type converter and each value is a ca... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1a6c17e4-4473-4217-a1e8-17199068a006 | CPython Docs | file://datasets/cpython/Doc/library/configparser.rst | unknown | 1c1a2652-09ff-48b4-9ab2-aae53e157cab | 14,952 | supabase-export-v2 | b330f6c8c7e8a1b2 | empty lines. Comments can be indented. When *inline_comment_prefixes* is given, it will be used as the set of substrings that prefix comments in non-empty lines.
When *strict* is ``True`` (the default), the parser won't allow for
any section or option duplicates while reading from a single source (file,
string or dic... | trusted_official_docs | CPython Docs | empty lines. Comments can be indented. When *inline_comment_prefixes* is given, it will be used as the set of substrings that prefix comments in non-empty lines.
When *strict* is ``True`` (the default), the parser won't allow for
any section or option duplicates while reading from a single source (file,
string or dic... | empty lines. Comments can be indented. When *inline_comment_prefixes* is given, it will be used as the set of substrings that prefix comments in non-empty lines.
When *strict* is ``True`` (the default), the parser won't allow for
any section or option duplicates while reading from a single source (file,
string or dic... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1e8d7abb-c1d9-4b8c-8df6-7eb25b01e8bc | CPython Docs | file://datasets/cpython/Doc/library/configparser.rst | unknown | 1c1a2652-09ff-48b4-9ab2-aae53e157cab | 14,900 | supabase-export-v2 | 08fc688f860b81ad | * *interpolation*, default value: ``configparser.BasicInterpolation``
Interpolation behaviour may be customized by providing a custom handler
through the *interpolation* argument. ``None`` can be used to turn off
interpolation completely, ``ExtendedInterpolation()`` provides a more
advanced variant inspired by ``zc.... | trusted_official_docs | CPython Docs | * *interpolation*, default value: ``configparser.BasicInterpolation``
Interpolation behaviour may be customized by providing a custom handler
through the *interpolation* argument. ``None`` can be used to turn off
interpolation completely, ``ExtendedInterpolation()`` provides a more
advanced variant inspired by ``zc.... | * *interpolation*, default value: ``configparser.BasicInterpolation``
Interpolation behaviour may be customized by providing a custom handler
through the *interpolation* argument. ``None`` can be used to turn off
interpolation completely, ``ExtendedInterpolation()`` provides a more
advanced variant inspired by ``zc.... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1fb4fa25-e1da-4667-a549-6481f2e826ab | CPython Docs | file://datasets/cpython/Doc/library/configparser.rst | unknown | 1c1a2652-09ff-48b4-9ab2-aae53e157cab | 15,026 | supabase-export-v2 | b0ecd1ec29babf39 | .. method:: remove_option(section, option)
Remove the specified *option* from the specified *section*. If the
section does not exist, raise :exc:`NoSectionError`. If the option
existed to be removed, return :const:`True`; otherwise return
:const:`False`. | trusted_official_docs | CPython Docs | .. method:: remove_option(section, option)
Remove the specified *option* from the specified *section*. If the
section does not exist, raise :exc:`NoSectionError`. If the option
existed to be removed, return :const:`True`; otherwise return
:const:`False`. | .. method:: remove_option(section, option)
Remove the specified *option* from the specified *section*. If the
section does not exist, raise :exc:`NoSectionError`. If the option
existed to be removed, return :const:`True`; otherwise return
:const:`False`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
202633b6-4773-4c30-996d-cae2d5cf3da2 | CPython Docs | file://datasets/cpython/Doc/library/configparser.rst | unknown | 1c1a2652-09ff-48b4-9ab2-aae53e157cab | 14,888 | supabase-export-v2 | 60a2bebd23b4af0f | enabled_extension another_extension yet_another_extension >>> print(parser['hashes']['interpolation not necessary']) if # is not at line start >>> print(parser['hashes']['even in multiline values']) line #1 line #2 line #3
* *strict*, default value: ``True`` | trusted_official_docs | CPython Docs | enabled_extension another_extension yet_another_extension >>> print(parser['hashes']['interpolation not necessary']) if # is not at line start >>> print(parser['hashes']['even in multiline values']) line #1 line #2 line #3
* *strict*, default value: ``True`` | enabled_extension another_extension yet_another_extension >>> print(parser['hashes']['interpolation not necessary']) if # is not at line start >>> print(parser['hashes']['even in multiline values']) line #1 line #2 line #3
* *strict*, default value: ``True`` | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
20d4f518-cbba-4da4-b958-b00f42f11f3b | CPython Docs | file://datasets/cpython/Doc/library/configparser.rst | unknown | 1c1a2652-09ff-48b4-9ab2-aae53e157cab | 14,906 | supabase-export-v2 | 3fe4c42abfcf7980 | .. attribute:: ConfigParser.BOOLEAN_STATES
By default when using :meth:`~ConfigParser.getboolean`, config parsers
consider the following values ``True``: ``'1'``, ``'yes'``, ``'true'``,
``'on'`` and the following values ``False``: ``'0'``, ``'no'``, ``'false'``,
``'off'``. You can override this by specifying a custo... | trusted_official_docs | CPython Docs | .. attribute:: ConfigParser.BOOLEAN_STATES
By default when using :meth:`~ConfigParser.getboolean`, config parsers
consider the following values ``True``: ``'1'``, ``'yes'``, ``'true'``,
``'on'`` and the following values ``False``: ``'0'``, ``'no'``, ``'false'``,
``'off'``. You can override this by specifying a custo... | .. attribute:: ConfigParser.BOOLEAN_STATES
By default when using :meth:`~ConfigParser.getboolean`, config parsers
consider the following values ``True``: ``'1'``, ``'yes'``, ``'true'``,
``'on'`` and the following values ``False``: ``'0'``, ``'no'``, ``'false'``,
``'off'``. You can override this by specifying a custo... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
21c815cd-a7d8-410f-9d09-0d4285b24c51 | CPython Docs | file://datasets/cpython/Doc/library/configparser.rst | unknown | 1c1a2652-09ff-48b4-9ab2-aae53e157cab | 14,994 | supabase-export-v2 | 7cc908c49396c989 | the name of the file being read. If not given and *f* has a :attr:`!name` attribute, that is used for *source*; the default is ``'<???>'``.
.. versionadded:: 3.2
Replaces :meth:`!readfp`. | trusted_official_docs | CPython Docs | the name of the file being read. If not given and *f* has a :attr:`!name` attribute, that is used for *source*; the default is ``'<???>'``.
.. versionadded:: 3.2
Replaces :meth:`!readfp`. | the name of the file being read. If not given and *f* has a :attr:`!name` attribute, that is used for *source*; the default is ``'<???>'``.
.. versionadded:: 3.2
Replaces :meth:`!readfp`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2212a3fc-a196-4a5b-9699-a446881485a5 | CPython Docs | file://datasets/cpython/Doc/library/configparser.rst | unknown | 1c1a2652-09ff-48b4-9ab2-aae53e157cab | 14,801 | supabase-export-v2 | 42e0735d20d101f5 | >>> config.get('forge.example', 'monster', ... fallback='No such things as monsters') 'No such things as monsters'
The same ``fallback`` argument can be used with the
:meth:`~ConfigParser.getint`, :meth:`~ConfigParser.getfloat` and
:meth:`~ConfigParser.getboolean` methods, for example: | trusted_official_docs | CPython Docs | >>> config.get('forge.example', 'monster', ... fallback='No such things as monsters') 'No such things as monsters'
The same ``fallback`` argument can be used with the
:meth:`~ConfigParser.getint`, :meth:`~ConfigParser.getfloat` and
:meth:`~ConfigParser.getboolean` methods, for example: | >>> config.get('forge.example', 'monster', ... fallback='No such things as monsters') 'No such things as monsters'
The same ``fallback`` argument can be used with the
:meth:`~ConfigParser.getint`, :meth:`~ConfigParser.getfloat` and
:meth:`~ConfigParser.getboolean` methods, for example: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
22f4b88d-9fed-431d-8f16-10d795369a90 | CPython Docs | file://datasets/cpython/Doc/library/configparser.rst | unknown | 1c1a2652-09ff-48b4-9ab2-aae53e157cab | 14,890 | supabase-export-v2 | d311a3947d937c2b | section or option duplicates while reading from a single source (using :meth:`~ConfigParser.read_file`, :meth:`~ConfigParser.read_string` or :meth:`~ConfigParser.read_dict`). It is recommended to use strict parsers in new applications.
.. versionchanged:: 3.2
In previous versions of :mod:`!configparser` behaviour matc... | trusted_official_docs | CPython Docs | section or option duplicates while reading from a single source (using :meth:`~ConfigParser.read_file`, :meth:`~ConfigParser.read_string` or :meth:`~ConfigParser.read_dict`). It is recommended to use strict parsers in new applications.
.. versionchanged:: 3.2
In previous versions of :mod:`!configparser` behaviour matc... | section or option duplicates while reading from a single source (using :meth:`~ConfigParser.read_file`, :meth:`~ConfigParser.read_string` or :meth:`~ConfigParser.read_dict`). It is recommended to use strict parsers in new applications.
.. versionchanged:: 3.2
In previous versions of :mod:`!configparser` behaviour matc... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2563f065-00c6-4182-a917-e5d572a4c066 | CPython Docs | file://datasets/cpython/Doc/library/configparser.rst | unknown | 1c1a2652-09ff-48b4-9ab2-aae53e157cab | 15,046 | supabase-export-v2 | 9aecdfc141ad2360 | .. versionchanged:: 3.13 The *allow_unnamed_section* argument was added.
.. note::
Consider using :class:`ConfigParser` instead which checks types of
the values to be stored internally. If you don't want interpolation, you
can use ``ConfigParser(interpolation=None)``. | trusted_official_docs | CPython Docs | .. versionchanged:: 3.13 The *allow_unnamed_section* argument was added.
.. note::
Consider using :class:`ConfigParser` instead which checks types of
the values to be stored internally. If you don't want interpolation, you
can use ``ConfigParser(interpolation=None)``. | .. versionchanged:: 3.13 The *allow_unnamed_section* argument was added.
.. note::
Consider using :class:`ConfigParser` instead which checks types of
the values to be stored internally. If you don't want interpolation, you
can use ``ConfigParser(interpolation=None)``. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
26149d6a-65c1-42ca-ac64-cbd6ca34834e | CPython Docs | file://datasets/cpython/Doc/library/configparser.rst | unknown | 1c1a2652-09ff-48b4-9ab2-aae53e157cab | 14,757 | supabase-export-v2 | 8a67129ec29ff120 | This library does *not* interpret or write the value-type prefixes used in the Windows Registry extended version of INI syntax.
.. warning::
Be cautious when parsing data from untrusted sources. A malicious
INI file may cause the decoder to consume considerable CPU and memory
resources. Limiting the size of data to ... | trusted_official_docs | CPython Docs | This library does *not* interpret or write the value-type prefixes used in the Windows Registry extended version of INI syntax.
.. warning::
Be cautious when parsing data from untrusted sources. A malicious
INI file may cause the decoder to consume considerable CPU and memory
resources. Limiting the size of data to ... | This library does *not* interpret or write the value-type prefixes used in the Windows Registry extended version of INI syntax.
.. warning::
Be cautious when parsing data from untrusted sources. A malicious
INI file may cause the decoder to consume considerable CPU and memory
resources. Limiting the size of data to ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
28e82017-aaa4-4c56-a97f-a22281b78666 | CPython Docs | file://datasets/cpython/Doc/library/configparser.rst | unknown | 1c1a2652-09ff-48b4-9ab2-aae53e157cab | 14,974 | supabase-export-v2 | ab2fc7f19cc52b66 | .. method:: add_section(section)
Add a section named *section* to the instance. If a section by the given
name already exists, :exc:`DuplicateSectionError` is raised. If the
*default section* name is passed, :exc:`ValueError` is raised. The name
of the section must be a string; if not, :exc:`TypeError` is raised. | trusted_official_docs | CPython Docs | .. method:: add_section(section)
Add a section named *section* to the instance. If a section by the given
name already exists, :exc:`DuplicateSectionError` is raised. If the
*default section* name is passed, :exc:`ValueError` is raised. The name
of the section must be a string; if not, :exc:`TypeError` is raised. | .. method:: add_section(section)
Add a section named *section* to the instance. If a section by the given
name already exists, :exc:`DuplicateSectionError` is raised. If the
*default section* name is passed, :exc:`ValueError` is raised. The name
of the section must be a string; if not, :exc:`TypeError` is raised. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
29cd48a3-0383-4eaa-8c31-c6cbaf63e496 | CPython Docs | file://datasets/cpython/Doc/library/configparser.rst | unknown | 1c1a2652-09ff-48b4-9ab2-aae53e157cab | 15,006 | supabase-export-v2 | 35be1ba3a580ae23 | If the key is not found and *fallback* is provided, it is used as a fallback value. ``None`` can be provided as a *fallback* value.
All the ``'%'`` interpolations are expanded in the return values, unless
the *raw* argument is true. Values for interpolation keys are looked up
in the same manner as the option. | trusted_official_docs | CPython Docs | If the key is not found and *fallback* is provided, it is used as a fallback value. ``None`` can be provided as a *fallback* value.
All the ``'%'`` interpolations are expanded in the return values, unless
the *raw* argument is true. Values for interpolation keys are looked up
in the same manner as the option. | If the key is not found and *fallback* is provided, it is used as a fallback value. ``None`` can be provided as a *fallback* value.
All the ``'%'`` interpolations are expanded in the return values, unless
the *raw* argument is true. Values for interpolation keys are looked up
in the same manner as the option. | python, official-docs, cpython, P0 | Local_Trusted_Corpus |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.