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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
796a10b4-dbb4-4145-ab33-7cae062928be | CPython Docs | file://datasets/cpython/Doc/library/selectors.rst | unknown | 6c851f62-9288-4630-804e-dd5ba8894175 | 16,922 | supabase-export-v2 | 1ea659ab7a4d8dd5 | BaseSelector +-- SelectSelector +-- PollSelector +-- EpollSelector +-- DevpollSelector +-- KqueueSelector
In the following, *events* is a bitwise mask indicating which I/O events should
be waited for on a given file object. It can be a combination of the module's
constants below: | trusted_official_docs | CPython Docs | BaseSelector +-- SelectSelector +-- PollSelector +-- EpollSelector +-- DevpollSelector +-- KqueueSelector
In the following, *events* is a bitwise mask indicating which I/O events should
be waited for on a given file object. It can be a combination of the module's
constants below: | BaseSelector +-- SelectSelector +-- PollSelector +-- EpollSelector +-- DevpollSelector +-- KqueueSelector
In the following, *events* is a bitwise mask indicating which I/O events should
be waited for on a given file object. It can be a combination of the module's
constants below: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
88ce822c-4ae6-48d8-91bb-ae6e256c20da | CPython Docs | file://datasets/cpython/Doc/library/selectors.rst | unknown | 6c851f62-9288-4630-804e-dd5ba8894175 | 16,949 | supabase-export-v2 | 6880555ea754aa2d | *key* is the :class:`SelectorKey` instance corresponding to a ready file object. *events* is a bitmask of events ready on this file object.
.. note::
This method can return before any file object becomes ready or the
timeout has elapsed if the current process receives a signal: in this
case, an empty list will be re... | trusted_official_docs | CPython Docs | *key* is the :class:`SelectorKey` instance corresponding to a ready file object. *events* is a bitmask of events ready on this file object.
.. note::
This method can return before any file object becomes ready or the
timeout has elapsed if the current process receives a signal: in this
case, an empty list will be re... | *key* is the :class:`SelectorKey` instance corresponding to a ready file object. *events* is a bitmask of events ready on this file object.
.. note::
This method can return before any file object becomes ready or the
timeout has elapsed if the current process receives a signal: in this
case, an empty list will be re... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
89760b04-8f54-42fb-85e0-1295df4c812b | CPython Docs | file://datasets/cpython/Doc/library/selectors.rst | unknown | 6c851f62-9288-4630-804e-dd5ba8894175 | 16,931 | supabase-export-v2 | 5e4924b1b4b40050 | .. class:: BaseSelector
A :class:`BaseSelector` is used to wait for I/O event readiness on multiple
file objects. It supports file stream registration, unregistration, and a
method to wait for I/O events on those streams, with an optional timeout. It's an abstract base class, so cannot be instantiated. Use
:class:`D... | trusted_official_docs | CPython Docs | .. class:: BaseSelector
A :class:`BaseSelector` is used to wait for I/O event readiness on multiple
file objects. It supports file stream registration, unregistration, and a
method to wait for I/O events on those streams, with an optional timeout. It's an abstract base class, so cannot be instantiated. Use
:class:`D... | .. class:: BaseSelector
A :class:`BaseSelector` is used to wait for I/O event readiness on multiple
file objects. It supports file stream registration, unregistration, and a
method to wait for I/O events on those streams, with an optional timeout. It's an abstract base class, so cannot be instantiated. Use
:class:`D... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
97629a64-cb27-4cf6-ab69-0a8a62caa5ed | CPython Docs | file://datasets/cpython/Doc/library/selectors.rst | unknown | 6c851f62-9288-4630-804e-dd5ba8894175 | 16,935 | supabase-export-v2 | 27b3ff90fbd5fd6f | an integer file descriptor or an object with a ``fileno()`` method. *events* is a bitwise mask of events to monitor. *data* is an opaque object.
This returns a new :class:`SelectorKey` instance, or raises a
:exc:`ValueError` in case of invalid event mask or file descriptor, or
:exc:`KeyError` if the file object is al... | trusted_official_docs | CPython Docs | an integer file descriptor or an object with a ``fileno()`` method. *events* is a bitwise mask of events to monitor. *data* is an opaque object.
This returns a new :class:`SelectorKey` instance, or raises a
:exc:`ValueError` in case of invalid event mask or file descriptor, or
:exc:`KeyError` if the file object is al... | an integer file descriptor or an object with a ``fileno()`` method. *events* is a bitwise mask of events to monitor. *data* is an opaque object.
This returns a new :class:`SelectorKey` instance, or raises a
:exc:`ValueError` in case of invalid event mask or file descriptor, or
:exc:`KeyError` if the file object is al... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
98d7ac27-642e-4615-8c2b-8d104e315782 | CPython Docs | file://datasets/cpython/Doc/library/selectors.rst | unknown | 6c851f62-9288-4630-804e-dd5ba8894175 | 16,948 | supabase-export-v2 | 08886efa13230f86 | This returns a list of ``(key, events)`` tuples, one for each ready file object.
*key* is the :class:`SelectorKey` instance corresponding to a ready file
object. *events* is a bitmask of events ready on this file object. | trusted_official_docs | CPython Docs | This returns a list of ``(key, events)`` tuples, one for each ready file object.
*key* is the :class:`SelectorKey` instance corresponding to a ready file
object. *events* is a bitmask of events ready on this file object. | This returns a list of ``(key, events)`` tuples, one for each ready file object.
*key* is the :class:`SelectorKey` instance corresponding to a ready file
object. *events* is a bitmask of events ready on this file object. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9db5a27f-5254-40be-a5e8-8f91756f975a | CPython Docs | file://datasets/cpython/Doc/library/selectors.rst | unknown | 6c851f62-9288-4630-804e-dd5ba8894175 | 16,939 | supabase-export-v2 | f3b83b3fd41bddb2 | *fileobj* must be a file object previously registered.
This returns the associated :class:`SelectorKey` instance, or raises a
:exc:`KeyError` if *fileobj* is not registered. It will raise
:exc:`ValueError` if *fileobj* is invalid (e.g. it has no ``fileno()``
method or its ``fileno()`` method has an invalid return va... | trusted_official_docs | CPython Docs | *fileobj* must be a file object previously registered.
This returns the associated :class:`SelectorKey` instance, or raises a
:exc:`KeyError` if *fileobj* is not registered. It will raise
:exc:`ValueError` if *fileobj* is invalid (e.g. it has no ``fileno()``
method or its ``fileno()`` method has an invalid return va... | *fileobj* must be a file object previously registered.
This returns the associated :class:`SelectorKey` instance, or raises a
:exc:`KeyError` if *fileobj* is not registered. It will raise
:exc:`ValueError` if *fileobj* is invalid (e.g. it has no ``fileno()``
method or its ``fileno()`` method has an invalid return va... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9eacf521-f5d3-46de-8a40-e47a653b5568 | CPython Docs | file://datasets/cpython/Doc/library/selectors.rst | unknown | 6c851f62-9288-4630-804e-dd5ba8894175 | 16,982 | supabase-export-v2 | 8b04c2d7cef9e971 | def accept(sock, mask): conn, addr = sock.accept() # Should be ready print('accepted', conn, 'from', addr) conn.setblocking(False) sel.register(conn, selectors.EVENT_READ, read)
def read(conn, mask):
data = conn.recv(1000) # Should be ready
if data:
print('echoing', repr(data), 'to', conn)
conn.send(data) # Hope it... | trusted_official_docs | CPython Docs | def accept(sock, mask): conn, addr = sock.accept() # Should be ready print('accepted', conn, 'from', addr) conn.setblocking(False) sel.register(conn, selectors.EVENT_READ, read)
def read(conn, mask):
data = conn.recv(1000) # Should be ready
if data:
print('echoing', repr(data), 'to', conn)
conn.send(data) # Hope it... | def accept(sock, mask): conn, addr = sock.accept() # Should be ready print('accepted', conn, 'from', addr) conn.setblocking(False) sel.register(conn, selectors.EVENT_READ, read)
def read(conn, mask):
data = conn.recv(1000) # Should be ready
if data:
print('echoing', repr(data), 'to', conn)
conn.send(data) # Hope it... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b5e81e5f-fa17-46de-8a3a-017d17d9b752 | CPython Docs | file://datasets/cpython/Doc/library/selectors.rst | unknown | 6c851f62-9288-4630-804e-dd5ba8894175 | 16,946 | supabase-export-v2 | c72213c6676a8c6e | Wait until some registered file objects become ready, or the timeout expires.
If ``timeout > 0``, this specifies the maximum wait time, in seconds. If ``timeout <= 0``, the call won't block, and will report the currently
ready file objects. If *timeout* is ``None``, the call will block until a monitored file object
b... | trusted_official_docs | CPython Docs | Wait until some registered file objects become ready, or the timeout expires.
If ``timeout > 0``, this specifies the maximum wait time, in seconds. If ``timeout <= 0``, the call won't block, and will report the currently
ready file objects. If *timeout* is ``None``, the call will block until a monitored file object
b... | Wait until some registered file objects become ready, or the timeout expires.
If ``timeout > 0``, this specifies the maximum wait time, in seconds. If ``timeout <= 0``, the call won't block, and will report the currently
ready file objects. If *timeout* is ``None``, the call will block until a monitored file object
b... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b96fa2dc-57c0-4d2a-a0f9-f4dd0a08b43c | CPython Docs | file://datasets/cpython/Doc/library/selectors.rst | unknown | 6c851f62-9288-4630-804e-dd5ba8894175 | 16,925 | supabase-export-v2 | e9401e33d7ab8ac6 | .. class:: SelectorKey
A :class:`SelectorKey` is a :class:`~collections.namedtuple` used to
associate a file object to its underlying file descriptor, selected event
mask and attached data. It is returned by several :class:`BaseSelector`
methods. | trusted_official_docs | CPython Docs | .. class:: SelectorKey
A :class:`SelectorKey` is a :class:`~collections.namedtuple` used to
associate a file object to its underlying file descriptor, selected event
mask and attached data. It is returned by several :class:`BaseSelector`
methods. | .. class:: SelectorKey
A :class:`SelectorKey` is a :class:`~collections.namedtuple` used to
associate a file object to its underlying file descriptor, selected event
mask and attached data. It is returned by several :class:`BaseSelector`
methods. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bfd2af04-96c3-43b3-bdc5-8268c457054a | CPython Docs | file://datasets/cpython/Doc/library/selectors.rst | unknown | 6c851f62-9288-4630-804e-dd5ba8894175 | 16,950 | supabase-export-v2 | 1252e28d70503f59 | file object becomes ready or the timeout has elapsed if the current process receives a signal: in this case, an empty list will be returned.
.. versionchanged:: 3.5
The selector is now retried with a recomputed timeout when interrupted
by a signal if the signal handler did not raise an exception (see
:pep:`475` for ... | trusted_official_docs | CPython Docs | file object becomes ready or the timeout has elapsed if the current process receives a signal: in this case, an empty list will be returned.
.. versionchanged:: 3.5
The selector is now retried with a recomputed timeout when interrupted
by a signal if the signal handler did not raise an exception (see
:pep:`475` for ... | file object becomes ready or the timeout has elapsed if the current process receives a signal: in this case, an empty list will be returned.
.. versionchanged:: 3.5
The selector is now retried with a recomputed timeout when interrupted
by a signal if the signal handler did not raise an exception (see
:pep:`475` for ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e6ba5ed4-0a1c-4028-84a8-976658b2c883 | CPython Docs | file://datasets/cpython/Doc/library/selectors.rst | unknown | 6c851f62-9288-4630-804e-dd5ba8894175 | 16,932 | supabase-export-v2 | b954677cd1810dbc | :class:`KqueueSelector` etc. if you want to specifically use an implementation, and your platform supports it. :class:`BaseSelector` and its concrete implementations support the :term:`context manager` protocol.
.. method:: register(fileobj, events, data=None)
:abstractmethod: | trusted_official_docs | CPython Docs | :class:`KqueueSelector` etc. if you want to specifically use an implementation, and your platform supports it. :class:`BaseSelector` and its concrete implementations support the :term:`context manager` protocol.
.. method:: register(fileobj, events, data=None)
:abstractmethod: | :class:`KqueueSelector` etc. if you want to specifically use an implementation, and your platform supports it. :class:`BaseSelector` and its concrete implementations support the :term:`context manager` protocol.
.. method:: register(fileobj, events, data=None)
:abstractmethod: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f5b26b72-7ee8-4693-81f6-fcb8be8f505f | CPython Docs | file://datasets/cpython/Doc/library/selectors.rst | unknown | 6c851f62-9288-4630-804e-dd5ba8894175 | 16,983 | supabase-export-v2 | 157de614e4a3a2c2 | mask): data = conn.recv(1000) # Should be ready if data: print('echoing', repr(data), 'to', conn) conn.send(data) # Hope it won't block else: print('closing', conn) sel.unregister(conn) conn.close()
sock = socket.socket()
sock.bind(('localhost', 1234))
sock.listen(100)
sock.setblocking(False)
sel.register(sock, sel... | trusted_official_docs | CPython Docs | mask): data = conn.recv(1000) # Should be ready if data: print('echoing', repr(data), 'to', conn) conn.send(data) # Hope it won't block else: print('closing', conn) sel.unregister(conn) conn.close()
sock = socket.socket()
sock.bind(('localhost', 1234))
sock.listen(100)
sock.setblocking(False)
sel.register(sock, sel... | mask): data = conn.recv(1000) # Should be ready if data: print('echoing', repr(data), 'to', conn) conn.send(data) # Hope it won't block else: print('closing', conn) sel.unregister(conn) conn.close()
sock = socket.socket()
sock.bind(('localhost', 1234))
sock.listen(100)
sock.setblocking(False)
sel.register(sock, sel... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0fcf6fc2-8d97-4917-ae9c-53928a52301b | CPython Docs | file://datasets/cpython/Doc/library/pydoc.rst | unknown | d3f7903f-d220-4085-8ac6-087024b331d7 | 17,001 | supabase-export-v2 | 5651e6e1d5a43c4a | allowing you to browse the documentation at ``http://localhost:1234/`` in your preferred web browser. Specifying ``0`` as the port number will select an arbitrary unused port.
:program:`python -m pydoc -n <hostname>` will start the server listening at the given
hostname. By default the hostname is 'localhost' but if yo... | trusted_official_docs | CPython Docs | allowing you to browse the documentation at ``http://localhost:1234/`` in your preferred web browser. Specifying ``0`` as the port number will select an arbitrary unused port.
:program:`python -m pydoc -n <hostname>` will start the server listening at the given
hostname. By default the hostname is 'localhost' but if yo... | allowing you to browse the documentation at ``http://localhost:1234/`` in your preferred web browser. Specifying ``0`` as the port number will select an arbitrary unused port.
:program:`python -m pydoc -n <hostname>` will start the server listening at the given
hostname. By default the hostname is 'localhost' but if yo... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
38050799-7140-467a-8f3f-b649332627fa | CPython Docs | file://datasets/cpython/Doc/library/pydoc.rst | unknown | d3f7903f-d220-4085-8ac6-087024b331d7 | 16,990 | supabase-export-v2 | 9612cec736d1bc8e | --------------
The :mod:`!pydoc` module automatically generates documentation from Python
modules. The documentation can be presented as pages of text on the console,
served to a web browser, or saved to HTML files. | trusted_official_docs | CPython Docs | --------------
The :mod:`!pydoc` module automatically generates documentation from Python
modules. The documentation can be presented as pages of text on the console,
served to a web browser, or saved to HTML files. | --------------
The :mod:`!pydoc` module automatically generates documentation from Python
modules. The documentation can be presented as pages of text on the console,
served to a web browser, or saved to HTML files. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3e07d6b0-39c7-45b6-8ff3-a9701a18c8d8 | CPython Docs | file://datasets/cpython/Doc/library/pydoc.rst | unknown | d3f7903f-d220-4085-8ac6-087024b331d7 | 16,991 | supabase-export-v2 | 997a285af17f49d7 | from Python modules. The documentation can be presented as pages of text on the console, served to a web browser, or saved to HTML files.
For modules, classes, functions and methods, the displayed documentation is
derived from the docstring (i.e. the :attr:`~definition.__doc__` attribute) of the object,
and recursively... | trusted_official_docs | CPython Docs | from Python modules. The documentation can be presented as pages of text on the console, served to a web browser, or saved to HTML files.
For modules, classes, functions and methods, the displayed documentation is
derived from the docstring (i.e. the :attr:`~definition.__doc__` attribute) of the object,
and recursively... | from Python modules. The documentation can be presented as pages of text on the console, served to a web browser, or saved to HTML files.
For modules, classes, functions and methods, the displayed documentation is
derived from the docstring (i.e. the :attr:`~definition.__doc__` attribute) of the object,
and recursively... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
481e1e6a-3796-4e36-9691-326809eb362a | CPython Docs | file://datasets/cpython/Doc/library/pydoc.rst | unknown | d3f7903f-d220-4085-8ac6-087024b331d7 | 17,000 | supabase-export-v2 | c3235af20ab69355 | argument, again in a manner similar to the Unix :program:`man` command. The synopsis line of a module is the first line of its documentation string.
You can also use :program:`pydoc` to start an HTTP server on the local machine
that will serve documentation to visiting web browsers. :program:`python -m pydoc -p 1234`
w... | trusted_official_docs | CPython Docs | argument, again in a manner similar to the Unix :program:`man` command. The synopsis line of a module is the first line of its documentation string.
You can also use :program:`pydoc` to start an HTTP server on the local machine
that will serve documentation to visiting web browsers. :program:`python -m pydoc -p 1234`
w... | argument, again in a manner similar to the Unix :program:`man` command. The synopsis line of a module is the first line of its documentation string.
You can also use :program:`pydoc` to start an HTTP server on the local machine
that will serve documentation to visiting web browsers. :program:`python -m pydoc -p 1234`
w... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
538ffd2e-c51b-4ca6-a6fd-47930ea0ab3e | CPython Docs | file://datasets/cpython/Doc/library/pydoc.rst | unknown | d3f7903f-d220-4085-8ac6-087024b331d7 | 16,996 | supabase-export-v2 | 589df28909ae5c11 | .. note::
In order to find objects and their documentation, :mod:`!pydoc` imports the
module(s) to be documented. Therefore, any code on module level will be
executed on that occasion. Use an ``if __name__ == '__main__':`` guard to
only execute code when a file is invoked as a script and not just imported. | trusted_official_docs | CPython Docs | .. note::
In order to find objects and their documentation, :mod:`!pydoc` imports the
module(s) to be documented. Therefore, any code on module level will be
executed on that occasion. Use an ``if __name__ == '__main__':`` guard to
only execute code when a file is invoked as a script and not just imported. | .. note::
In order to find objects and their documentation, :mod:`!pydoc` imports the
module(s) to be documented. Therefore, any code on module level will be
executed on that occasion. Use an ``if __name__ == '__main__':`` guard to
only execute code when a file is invoked as a script and not just imported. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7dd8bd7e-d61d-4235-ad9a-2d47e8596845 | CPython Docs | file://datasets/cpython/Doc/library/pydoc.rst | unknown | d3f7903f-d220-4085-8ac6-087024b331d7 | 16,992 | supabase-export-v2 | 18691fda0a239768 | comment lines just above the definition of the class, function or method in the source file, or at the top of the module (see :func:`inspect.getcomments`).
The built-in function :func:`help` invokes the online help system in the
interactive interpreter, which uses :mod:`!pydoc` to generate its documentation
as text on ... | trusted_official_docs | CPython Docs | comment lines just above the definition of the class, function or method in the source file, or at the top of the module (see :func:`inspect.getcomments`).
The built-in function :func:`help` invokes the online help system in the
interactive interpreter, which uses :mod:`!pydoc` to generate its documentation
as text on ... | comment lines just above the definition of the class, function or method in the source file, or at the top of the module (see :func:`inspect.getcomments`).
The built-in function :func:`help` invokes the online help system in the
interactive interpreter, which uses :mod:`!pydoc` to generate its documentation
as text on ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
88912fa2-2537-4b7b-8013-d4df26f830aa | CPython Docs | file://datasets/cpython/Doc/library/pydoc.rst | unknown | d3f7903f-d220-4085-8ac6-087024b331d7 | 16,994 | supabase-export-v2 | 8e5ea8c31aacb308 | python -m pydoc sys
at a shell prompt will display documentation on the :mod:`sys` module, in a
style similar to the manual pages shown by the Unix :program:`man` command. The
argument to :program:`pydoc` can be the name of a function, module, or package,
or a dotted reference to a class, method, or function within a m... | trusted_official_docs | CPython Docs | python -m pydoc sys
at a shell prompt will display documentation on the :mod:`sys` module, in a
style similar to the manual pages shown by the Unix :program:`man` command. The
argument to :program:`pydoc` can be the name of a function, module, or package,
or a dotted reference to a class, method, or function within a m... | python -m pydoc sys
at a shell prompt will display documentation on the :mod:`sys` module, in a
style similar to the manual pages shown by the Unix :program:`man` command. The
argument to :program:`pydoc` can be the name of a function, module, or package,
or a dotted reference to a class, method, or function within a m... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
928044dc-99b6-4870-abb2-7616390b63c8 | CPython Docs | file://datasets/cpython/Doc/library/pydoc.rst | unknown | d3f7903f-d220-4085-8ac6-087024b331d7 | 16,999 | supabase-export-v2 | 65f4b3b4f1976f4a | before the argument will cause HTML documentation to be written out to a file in the current directory, instead of displaying text on the console.
Specifying a ``-k`` flag before the argument will search the synopsis
lines of all available modules for the keyword given as the argument, again in a
manner similar to the ... | trusted_official_docs | CPython Docs | before the argument will cause HTML documentation to be written out to a file in the current directory, instead of displaying text on the console.
Specifying a ``-k`` flag before the argument will search the synopsis
lines of all available modules for the keyword given as the argument, again in a
manner similar to the ... | before the argument will cause HTML documentation to be written out to a file in the current directory, instead of displaying text on the console.
Specifying a ``-k`` flag before the argument will search the synopsis
lines of all available modules for the keyword given as the argument, again in a
manner similar to the ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
968195b5-9277-4416-9e42-570d033ce578 | CPython Docs | file://datasets/cpython/Doc/library/pydoc.rst | unknown | d3f7903f-d220-4085-8ac6-087024b331d7 | 17,004 | supabase-export-v2 | dd464c5958228334 | modules. Thus, invoking :program:`pydoc spam` documents precisely the version of the module you would get if you started the Python interpreter and typed ``import spam``.
Module docs for core modules are assumed to reside in
``https://docs.python.org/X.Y/library/`` where ``X`` and ``Y`` are the
major and minor version ... | trusted_official_docs | CPython Docs | modules. Thus, invoking :program:`pydoc spam` documents precisely the version of the module you would get if you started the Python interpreter and typed ``import spam``.
Module docs for core modules are assumed to reside in
``https://docs.python.org/X.Y/library/`` where ``X`` and ``Y`` are the
major and minor version ... | modules. Thus, invoking :program:`pydoc spam` documents precisely the version of the module you would get if you started the Python interpreter and typed ``import spam``.
Module docs for core modules are assumed to reside in
``https://docs.python.org/X.Y/library/`` where ``X`` and ``Y`` are the
major and minor version ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9e8756df-aa62-4c64-bc5a-213f5199eefa | CPython Docs | file://datasets/cpython/Doc/library/pydoc.rst | unknown | d3f7903f-d220-4085-8ac6-087024b331d7 | 16,998 | supabase-export-v2 | e9b6aa2f32e4c5ad | the :envvar:`MANPAGER` or the :envvar:`PAGER` environment variable is set, :program:`pydoc` will use its value as a pagination program. When both are set, :envvar:`MANPAGER` is used.
Specifying a ``-w`` flag before the argument will cause HTML documentation
to be written out to a file in the current directory, instead ... | trusted_official_docs | CPython Docs | the :envvar:`MANPAGER` or the :envvar:`PAGER` environment variable is set, :program:`pydoc` will use its value as a pagination program. When both are set, :envvar:`MANPAGER` is used.
Specifying a ``-w`` flag before the argument will cause HTML documentation
to be written out to a file in the current directory, instead ... | the :envvar:`MANPAGER` or the :envvar:`PAGER` environment variable is set, :program:`pydoc` will use its value as a pagination program. When both are set, :envvar:`MANPAGER` is used.
Specifying a ``-w`` flag before the argument will cause HTML documentation
to be written out to a file in the current directory, instead ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d8b256ef-c2b5-462e-9e04-2153a203032a | CPython Docs | file://datasets/cpython/Doc/library/pydoc.rst | unknown | d3f7903f-d220-4085-8ac6-087024b331d7 | 17,003 | supabase-export-v2 | 485381beb5d37306 | help on an individual item, *Search* all modules with a keyword in their synopsis line, and go to the *Module index*, *Topics* and *Keywords* pages.
When :program:`pydoc` generates documentation, it uses the current environment
and path to locate modules. Thus, invoking :program:`pydoc spam`
documents precisely the ver... | trusted_official_docs | CPython Docs | help on an individual item, *Search* all modules with a keyword in their synopsis line, and go to the *Module index*, *Topics* and *Keywords* pages.
When :program:`pydoc` generates documentation, it uses the current environment
and path to locate modules. Thus, invoking :program:`pydoc spam`
documents precisely the ver... | help on an individual item, *Search* all modules with a keyword in their synopsis line, and go to the *Module index*, *Topics* and *Keywords* pages.
When :program:`pydoc` generates documentation, it uses the current environment
and path to locate modules. Thus, invoking :program:`pydoc spam`
documents precisely the ver... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e275282a-ce73-405a-9204-39a2b5dd8afa | CPython Docs | file://datasets/cpython/Doc/library/pydoc.rst | unknown | d3f7903f-d220-4085-8ac6-087024b331d7 | 17,002 | supabase-export-v2 | f5369774b7a9d463 | change the host name that the server responds to. During development this is especially useful if you want to run pydoc from within a container.
:program:`python -m pydoc -b` will start the server and additionally open a web
browser to a module index page. Each served page has a navigation bar at the
top where you can ... | trusted_official_docs | CPython Docs | change the host name that the server responds to. During development this is especially useful if you want to run pydoc from within a container.
:program:`python -m pydoc -b` will start the server and additionally open a web
browser to a module index page. Each served page has a navigation bar at the
top where you can ... | change the host name that the server responds to. During development this is especially useful if you want to run pydoc from within a container.
:program:`python -m pydoc -b` will start the server and additionally open a web
browser to a module index page. Each served page has a navigation bar at the
top where you can ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e8e903d1-bb03-4f72-ab86-cef8c373b393 | CPython Docs | file://datasets/cpython/Doc/library/pydoc.rst | unknown | d3f7903f-d220-4085-8ac6-087024b331d7 | 17,005 | supabase-export-v2 | d27f83521994b37d | This can be overridden by setting the :envvar:`!PYTHONDOCS` environment variable to a different URL or to a local directory containing the Library Reference Manual pages.
.. versionchanged:: 3.2
Added the ``-b`` option. | trusted_official_docs | CPython Docs | This can be overridden by setting the :envvar:`!PYTHONDOCS` environment variable to a different URL or to a local directory containing the Library Reference Manual pages.
.. versionchanged:: 3.2
Added the ``-b`` option. | This can be overridden by setting the :envvar:`!PYTHONDOCS` environment variable to a different URL or to a local directory containing the Library Reference Manual pages.
.. versionchanged:: 3.2
Added the ``-b`` option. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fd0f2fa8-86c5-4e8b-8489-b1a3914fb6fb | CPython Docs | file://datasets/cpython/Doc/library/pydoc.rst | unknown | d3f7903f-d220-4085-8ac6-087024b331d7 | 16,997 | supabase-export-v2 | 52e96733f6bdd143 | that occasion. Use an ``if __name__ == '__main__':`` guard to only execute code when a file is invoked as a script and not just imported.
When printing output to the console, :program:`pydoc` attempts to paginate the
output for easier reading. If either the :envvar:`MANPAGER` or the
:envvar:`PAGER` environment variable... | trusted_official_docs | CPython Docs | that occasion. Use an ``if __name__ == '__main__':`` guard to only execute code when a file is invoked as a script and not just imported.
When printing output to the console, :program:`pydoc` attempts to paginate the
output for easier reading. If either the :envvar:`MANPAGER` or the
:envvar:`PAGER` environment variable... | that occasion. Use an ``if __name__ == '__main__':`` guard to only execute code when a file is invoked as a script and not just imported.
When printing output to the console, :program:`pydoc` attempts to paginate the
output for easier reading. If either the :envvar:`MANPAGER` or the
:envvar:`PAGER` environment variable... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
035982ea-20d9-4770-84c8-f97c900d39c3 | CPython Docs | file://datasets/cpython/Doc/library/math.integer.rst | unknown | 4d96d78d-ed8b-4c78-92e7-ace25a3209dc | 17,032 | supabase-export-v2 | 765ef5d79720a7a0 | Evaluates to ``n! / (n - k)!`` when ``k <= n`` and evaluates to zero when ``k > n``.
If *k* is not specified or is ``None``, then *k* defaults to *n*
and the function returns ``n!``. | trusted_official_docs | CPython Docs | Evaluates to ``n! / (n - k)!`` when ``k <= n`` and evaluates to zero when ``k > n``.
If *k* is not specified or is ``None``, then *k* defaults to *n*
and the function returns ``n!``. | Evaluates to ``n! / (n - k)!`` when ``k <= n`` and evaluates to zero when ``k > n``.
If *k* is not specified or is ``None``, then *k* defaults to *n*
and the function returns ``n!``. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
10a52c95-8be3-4028-850b-8769be09aed9 | CPython Docs | file://datasets/cpython/Doc/library/math.integer.rst | unknown | 4d96d78d-ed8b-4c78-92e7-ace25a3209dc | 17,031 | supabase-export-v2 | 35dc6a15ad35f016 | Return the number of ways to choose *k* items from *n* items without repetition and with order.
Evaluates to ``n! / (n - k)!`` when ``k <= n`` and evaluates
to zero when ``k > n``. | trusted_official_docs | CPython Docs | Return the number of ways to choose *k* items from *n* items without repetition and with order.
Evaluates to ``n! / (n - k)!`` when ``k <= n`` and evaluates
to zero when ``k > n``. | Return the number of ways to choose *k* items from *n* items without repetition and with order.
Evaluates to ``n! / (n - k)!`` when ``k <= n`` and evaluates
to zero when ``k > n``. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1961e357-40b6-4b8a-95ba-f9451204707c | CPython Docs | file://datasets/cpython/Doc/library/math.integer.rst | unknown | 4d96d78d-ed8b-4c78-92e7-ace25a3209dc | 17,029 | supabase-export-v2 | f239302f241315b8 | that is a multiple of all arguments. If any of the arguments is zero, then the returned value is ``0``. ``lcm()`` without arguments returns ``1``.
.. function:: perm(n, k=None, /) | trusted_official_docs | CPython Docs | that is a multiple of all arguments. If any of the arguments is zero, then the returned value is ``0``. ``lcm()`` without arguments returns ``1``.
.. function:: perm(n, k=None, /) | that is a multiple of all arguments. If any of the arguments is zero, then the returned value is ``0``. ``lcm()`` without arguments returns ``1``.
.. function:: perm(n, k=None, /) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1b361a88-e413-4fc4-9c2e-f4e978265eb3 | CPython Docs | file://datasets/cpython/Doc/library/math.integer.rst | unknown | 4d96d78d-ed8b-4c78-92e7-ace25a3209dc | 17,017 | supabase-export-v2 | 3ec9ca7699d33a7d | Evaluates to ``n! / (k! * (n - k)!)`` when ``k <= n`` and evaluates to zero when ``k > n``.
Also called the binomial coefficient because it is equivalent
to the coefficient of k-th term in polynomial expansion of
``(1 + x)ⁿ``. | trusted_official_docs | CPython Docs | Evaluates to ``n! / (k! * (n - k)!)`` when ``k <= n`` and evaluates to zero when ``k > n``.
Also called the binomial coefficient because it is equivalent
to the coefficient of k-th term in polynomial expansion of
``(1 + x)ⁿ``. | Evaluates to ``n! / (k! * (n - k)!)`` when ``k <= n`` and evaluates to zero when ``k > n``.
Also called the binomial coefficient because it is equivalent
to the coefficient of k-th term in polynomial expansion of
``(1 + x)ⁿ``. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2bc1e67a-442b-46e9-88aa-784e77269e22 | CPython Docs | file://datasets/cpython/Doc/library/math.integer.rst | unknown | 4d96d78d-ed8b-4c78-92e7-ace25a3209dc | 17,016 | supabase-export-v2 | bf2a6af1e7d29245 | Return the number of ways to choose *k* items from *n* items without repetition and without order.
Evaluates to ``n! / (k! * (n - k)!)`` when ``k <= n`` and evaluates
to zero when ``k > n``. | trusted_official_docs | CPython Docs | Return the number of ways to choose *k* items from *n* items without repetition and without order.
Evaluates to ``n! / (k! * (n - k)!)`` when ``k <= n`` and evaluates
to zero when ``k > n``. | Return the number of ways to choose *k* items from *n* items without repetition and without order.
Evaluates to ``n! / (k! * (n - k)!)`` when ``k <= n`` and evaluates
to zero when ``k > n``. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3428c90e-2d27-4543-8416-9d06fc39d167 | CPython Docs | file://datasets/cpython/Doc/library/math.integer.rst | unknown | 4d96d78d-ed8b-4c78-92e7-ace25a3209dc | 17,012 | supabase-export-v2 | bf2e77a3ddca0d3b | --------------
This module provides access to the mathematical functions defined for integer arguments. These functions accept integers and objects that implement the
:meth:`~object.__index__` method which is used to convert the object to an integer
number. | trusted_official_docs | CPython Docs | --------------
This module provides access to the mathematical functions defined for integer arguments. These functions accept integers and objects that implement the
:meth:`~object.__index__` method which is used to convert the object to an integer
number. | --------------
This module provides access to the mathematical functions defined for integer arguments. These functions accept integers and objects that implement the
:meth:`~object.__index__` method which is used to convert the object to an integer
number. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5e9c118a-6cfd-47bb-82a4-b80590d64c79 | CPython Docs | file://datasets/cpython/Doc/library/math.integer.rst | unknown | 4d96d78d-ed8b-4c78-92e7-ace25a3209dc | 17,025 | supabase-export-v2 | 955a731a4ef71ba2 | This is the floor of the exact square root of *n*, or equivalently the greatest integer *a* such that *a*\ ² |nbsp| ≤ |nbsp| *n*.
For some applications, it may be more convenient to have the least integer
*a* such that *n* |nbsp| ≤ |nbsp| *a*\ ², or in other words the ceiling of
the exact square root of *n*. For posi... | trusted_official_docs | CPython Docs | This is the floor of the exact square root of *n*, or equivalently the greatest integer *a* such that *a*\ ² |nbsp| ≤ |nbsp| *n*.
For some applications, it may be more convenient to have the least integer
*a* such that *n* |nbsp| ≤ |nbsp| *a*\ ², or in other words the ceiling of
the exact square root of *n*. For posi... | This is the floor of the exact square root of *n*, or equivalently the greatest integer *a* such that *a*\ ² |nbsp| ≤ |nbsp| *n*.
For some applications, it may be more convenient to have the least integer
*a* such that *n* |nbsp| ≤ |nbsp| *a*\ ², or in other words the ceiling of
the exact square root of *n*. For posi... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8bf83d62-a51c-43df-8f98-43a4a9ffd450 | CPython Docs | file://datasets/cpython/Doc/library/math.integer.rst | unknown | 4d96d78d-ed8b-4c78-92e7-ace25a3209dc | 17,022 | supabase-export-v2 | 7b3eb4318ed4ea44 | .. function:: gcd(*integers)
Return the greatest common divisor of the specified integer arguments. If any of the arguments is nonzero, then the returned value is the largest
positive integer that is a divisor of all arguments. If all arguments
are zero, then the returned value is ``0``. ``gcd()`` without arguments
... | trusted_official_docs | CPython Docs | .. function:: gcd(*integers)
Return the greatest common divisor of the specified integer arguments. If any of the arguments is nonzero, then the returned value is the largest
positive integer that is a divisor of all arguments. If all arguments
are zero, then the returned value is ``0``. ``gcd()`` without arguments
... | .. function:: gcd(*integers)
Return the greatest common divisor of the specified integer arguments. If any of the arguments is nonzero, then the returned value is the largest
positive integer that is a divisor of all arguments. If all arguments
are zero, then the returned value is ``0``. ``gcd()`` without arguments
... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
93e40435-5ecf-4972-a14e-6d2a36b0cf4e | CPython Docs | file://datasets/cpython/Doc/library/math.integer.rst | unknown | 4d96d78d-ed8b-4c78-92e7-ace25a3209dc | 17,024 | supabase-export-v2 | 92058c53bf857440 | .. function:: isqrt(n, /)
Return the integer square root of the nonnegative integer *n*. This is the
floor of the exact square root of *n*, or equivalently the greatest integer
*a* such that *a*\ ² |nbsp| ≤ |nbsp| *n*. | trusted_official_docs | CPython Docs | .. function:: isqrt(n, /)
Return the integer square root of the nonnegative integer *n*. This is the
floor of the exact square root of *n*, or equivalently the greatest integer
*a* such that *a*\ ² |nbsp| ≤ |nbsp| *n*. | .. function:: isqrt(n, /)
Return the integer square root of the nonnegative integer *n*. This is the
floor of the exact square root of *n*, or equivalently the greatest integer
*a* such that *a*\ ² |nbsp| ≤ |nbsp| *n*. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a6054940-e9eb-442c-9130-38eccbfd2c13 | CPython Docs | file://datasets/cpython/Doc/library/math.integer.rst | unknown | 4d96d78d-ed8b-4c78-92e7-ace25a3209dc | 17,026 | supabase-export-v2 | b0d20da45806e4b9 | words the ceiling of the exact square root of *n*. For positive *n*, this can be computed using ``a = 1 + isqrt(n - 1)``.
.. |nbsp| unicode:: 0xA0
:trim: | trusted_official_docs | CPython Docs | words the ceiling of the exact square root of *n*. For positive *n*, this can be computed using ``a = 1 + isqrt(n - 1)``.
.. |nbsp| unicode:: 0xA0
:trim: | words the ceiling of the exact square root of *n*. For positive *n*, this can be computed using ``a = 1 + isqrt(n - 1)``.
.. |nbsp| unicode:: 0xA0
:trim: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b2a9c091-dbdb-4aa4-9831-58f71f8b41df | CPython Docs | file://datasets/cpython/Doc/library/math.integer.rst | unknown | 4d96d78d-ed8b-4c78-92e7-ace25a3209dc | 17,013 | supabase-export-v2 | 63ea27c447d75ba3 | for integer arguments. These functions accept integers and objects that implement the :meth:`~object.__index__` method which is used to convert the object to an integer number.
The following functions are provided by this module. All return values are
computed exactly and are integers. | trusted_official_docs | CPython Docs | for integer arguments. These functions accept integers and objects that implement the :meth:`~object.__index__` method which is used to convert the object to an integer number.
The following functions are provided by this module. All return values are
computed exactly and are integers. | for integer arguments. These functions accept integers and objects that implement the :meth:`~object.__index__` method which is used to convert the object to an integer number.
The following functions are provided by this module. All return values are
computed exactly and are integers. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bdf27d3e-6421-47f6-a776-96389b5b880c | CPython Docs | file://datasets/cpython/Doc/library/math.integer.rst | unknown | 4d96d78d-ed8b-4c78-92e7-ace25a3209dc | 17,018 | supabase-export-v2 | 82438cbb1f236ed0 | Also called the binomial coefficient because it is equivalent to the coefficient of k-th term in polynomial expansion of ``(1 + x)ⁿ``.
Raises :exc:`ValueError` if either of the arguments are negative. | trusted_official_docs | CPython Docs | Also called the binomial coefficient because it is equivalent to the coefficient of k-th term in polynomial expansion of ``(1 + x)ⁿ``.
Raises :exc:`ValueError` if either of the arguments are negative. | Also called the binomial coefficient because it is equivalent to the coefficient of k-th term in polynomial expansion of ``(1 + x)ⁿ``.
Raises :exc:`ValueError` if either of the arguments are negative. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e13bc838-934a-406e-b7e7-320be2039160 | CPython Docs | file://datasets/cpython/Doc/library/math.integer.rst | unknown | 4d96d78d-ed8b-4c78-92e7-ace25a3209dc | 17,028 | supabase-export-v2 | 3cd800bc59580858 | .. function:: lcm(*integers)
Return the least common multiple of the specified integer arguments. If all arguments are nonzero, then the returned value is the smallest
positive integer that is a multiple of all arguments. If any of the arguments
is zero, then the returned value is ``0``. ``lcm()`` without arguments
... | trusted_official_docs | CPython Docs | .. function:: lcm(*integers)
Return the least common multiple of the specified integer arguments. If all arguments are nonzero, then the returned value is the smallest
positive integer that is a multiple of all arguments. If any of the arguments
is zero, then the returned value is ``0``. ``lcm()`` without arguments
... | .. function:: lcm(*integers)
Return the least common multiple of the specified integer arguments. If all arguments are nonzero, then the returned value is the smallest
positive integer that is a multiple of all arguments. If any of the arguments
is zero, then the returned value is ``0``. ``lcm()`` without arguments
... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
004a6e3e-d788-4e5a-9018-0d7778dd24a1 | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,040 | supabase-export-v2 | e409884f8aaa4049 | each of them. A concrete object belonging to any of these categories is called a :term:`file object`. Other common terms are *stream* and *file-like object*.
Independent of its category, each concrete stream object will also have
various capabilities: it can be read-only, write-only, or read-write. It can
also allow ar... | trusted_official_docs | CPython Docs | each of them. A concrete object belonging to any of these categories is called a :term:`file object`. Other common terms are *stream* and *file-like object*.
Independent of its category, each concrete stream object will also have
various capabilities: it can be read-only, write-only, or read-write. It can
also allow ar... | each of them. A concrete object belonging to any of these categories is called a :term:`file object`. Other common terms are *stream* and *file-like object*.
Independent of its category, each concrete stream object will also have
various capabilities: it can be read-only, write-only, or read-write. It can
also allow ar... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
005277cb-ed15-4603-bf10-f3fa060ea22b | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,265 | supabase-export-v2 | 906b9307d3065ce2 | this object, data is normally placed into an internal buffer. The buffer will be written out to the underlying :class:`RawIOBase` object under various conditions, including:
* when the buffer gets too small for all pending data;
* when :meth:`flush` is called;
* when a :meth:`~IOBase.seek` is requested (for :class:`B... | trusted_official_docs | CPython Docs | this object, data is normally placed into an internal buffer. The buffer will be written out to the underlying :class:`RawIOBase` object under various conditions, including:
* when the buffer gets too small for all pending data;
* when :meth:`flush` is called;
* when a :meth:`~IOBase.seek` is requested (for :class:`B... | this object, data is normally placed into an internal buffer. The buffer will be written out to the underlying :class:`RawIOBase` object under various conditions, including:
* when the buffer gets too small for all pending data;
* when :meth:`flush` is called;
* when a :meth:`~IOBase.seek` is requested (for :class:`B... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0157af28-dc5d-4113-ae47-02b2d8299113 | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,112 | supabase-export-v2 | 4b61c9d7f53cafa5 | from strings. :class:`TextIOWrapper`, which extends :class:`TextIOBase`, is a buffered text interface to a buffered raw stream (:class:`BufferedIOBase`). Finally, :class:`StringIO` is an in-memory stream for text.
Argument names are not part of the specification, and only the arguments of
:func:`open` are intended to b... | trusted_official_docs | CPython Docs | from strings. :class:`TextIOWrapper`, which extends :class:`TextIOBase`, is a buffered text interface to a buffered raw stream (:class:`BufferedIOBase`). Finally, :class:`StringIO` is an in-memory stream for text.
Argument names are not part of the specification, and only the arguments of
:func:`open` are intended to b... | from strings. :class:`TextIOWrapper`, which extends :class:`TextIOBase`, is a buffered text interface to a buffered raw stream (:class:`BufferedIOBase`). Finally, :class:`StringIO` is an in-memory stream for text.
Argument names are not part of the specification, and only the arguments of
:func:`open` are intended to b... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
01ddf12c-caeb-4d24-88b1-6f3c70892949 | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,151 | supabase-export-v2 | d050ee5b746c2df6 | .. versionadded:: 3.1 The :data:`!SEEK_*` constants.
.. versionadded:: 3.3
Some operating systems could support additional values, like
:const:`os.SEEK_HOLE` or :const:`os.SEEK_DATA`. The valid values
for a file could depend on it being open in text or binary mode. | trusted_official_docs | CPython Docs | .. versionadded:: 3.1 The :data:`!SEEK_*` constants.
.. versionadded:: 3.3
Some operating systems could support additional values, like
:const:`os.SEEK_HOLE` or :const:`os.SEEK_DATA`. The valid values
for a file could depend on it being open in text or binary mode. | .. versionadded:: 3.1 The :data:`!SEEK_*` constants.
.. versionadded:: 3.3
Some operating systems could support additional values, like
:const:`os.SEEK_HOLE` or :const:`os.SEEK_DATA`. The valid values
for a file could depend on it being open in text or binary mode. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
02467a60-f654-477d-bab0-84c5343c253e | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,170 | supabase-export-v2 | bb76b6358b6e87eb | .. method:: read(size=-1, /)
Read up to *size* bytes from the object and return them. As a convenience,
if *size* is unspecified or -1, all bytes until EOF are returned. Otherwise, only one system call is ever made. Fewer than *size* bytes may
be returned if the operating system call returns fewer than *size* bytes. | trusted_official_docs | CPython Docs | .. method:: read(size=-1, /)
Read up to *size* bytes from the object and return them. As a convenience,
if *size* is unspecified or -1, all bytes until EOF are returned. Otherwise, only one system call is ever made. Fewer than *size* bytes may
be returned if the operating system call returns fewer than *size* bytes. | .. method:: read(size=-1, /)
Read up to *size* bytes from the object and return them. As a convenience,
if *size* is unspecified or -1, all bytes until EOF are returned. Otherwise, only one system call is ever made. Fewer than *size* bytes may
be returned if the operating system call returns fewer than *size* bytes. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
02d40357-37ab-45be-85ba-b82ed6bdb4e7 | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,264 | supabase-export-v2 | 6e7b6fa350b89404 | A buffered binary stream providing higher-level access to a writeable, non seekable :class:`RawIOBase` raw binary stream. It inherits from :class:`BufferedIOBase`.
When writing to this object, data is normally placed into an internal
buffer. The buffer will be written out to the underlying :class:`RawIOBase`
object u... | trusted_official_docs | CPython Docs | A buffered binary stream providing higher-level access to a writeable, non seekable :class:`RawIOBase` raw binary stream. It inherits from :class:`BufferedIOBase`.
When writing to this object, data is normally placed into an internal
buffer. The buffer will be written out to the underlying :class:`RawIOBase`
object u... | A buffered binary stream providing higher-level access to a writeable, non seekable :class:`RawIOBase` raw binary stream. It inherits from :class:`BufferedIOBase`.
When writing to this object, data is normally placed into an internal
buffer. The buffer will be written out to the underlying :class:`RawIOBase`
object u... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
03b21f78-cf63-4cc5-82cc-158c30a21890 | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,316 | supabase-export-v2 | c7640f17dbb55972 | reference) or ``'namereplace'`` (replace with ``\N{...}`` escape sequences) can be used. Any other error handling name that has been registered with :func:`codecs.register_error` is also valid.
.. index::
single: universal newlines; io.TextIOWrapper class | trusted_official_docs | CPython Docs | reference) or ``'namereplace'`` (replace with ``\N{...}`` escape sequences) can be used. Any other error handling name that has been registered with :func:`codecs.register_error` is also valid.
.. index::
single: universal newlines; io.TextIOWrapper class | reference) or ``'namereplace'`` (replace with ``\N{...}`` escape sequences) can be used. Any other error handling name that has been registered with :func:`codecs.register_error` is also valid.
.. index::
single: universal newlines; io.TextIOWrapper class | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
044f8cf9-4afb-436d-9d75-bd7ddfa5036a | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,321 | supabase-export-v2 | 29fb343950b85ee2 | If *line_buffering* is ``True``, :meth:`~IOBase.flush` is implied when a call to write contains a newline character or a carriage return.
If *write_through* is ``True``, calls to :meth:`~BufferedIOBase.write` are guaranteed
not to be buffered: any data written on the :class:`TextIOWrapper`
object is immediately handl... | trusted_official_docs | CPython Docs | If *line_buffering* is ``True``, :meth:`~IOBase.flush` is implied when a call to write contains a newline character or a carriage return.
If *write_through* is ``True``, calls to :meth:`~BufferedIOBase.write` are guaranteed
not to be buffered: any data written on the :class:`TextIOWrapper`
object is immediately handl... | If *line_buffering* is ``True``, :meth:`~IOBase.flush` is implied when a call to write contains a newline character or a carriage return.
If *write_through* is ``True``, calls to :meth:`~BufferedIOBase.write` are guaranteed
not to be buffered: any data written on the :class:`TextIOWrapper`
object is immediately handl... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0691ea6c-2368-40f1-83ee-dfc09b3927cb | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,393 | supabase-export-v2 | c6db4dfa6093a179 | re-enter a buffered object which it is already accessing, a :exc:`RuntimeError` is raised. Note this doesn't prohibit a different thread from entering the buffered object.
The above implicitly extends to text files, since the :func:`open` function
will wrap a buffered object inside a :class:`TextIOWrapper`. This includ... | trusted_official_docs | CPython Docs | re-enter a buffered object which it is already accessing, a :exc:`RuntimeError` is raised. Note this doesn't prohibit a different thread from entering the buffered object.
The above implicitly extends to text files, since the :func:`open` function
will wrap a buffered object inside a :class:`TextIOWrapper`. This includ... | re-enter a buffered object which it is already accessing, a :exc:`RuntimeError` is raised. Note this doesn't prohibit a different thread from entering the buffered object.
The above implicitly extends to text files, since the :func:`open` function
will wrap a buffered object inside a :class:`TextIOWrapper`. This includ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0703612f-c851-4396-94f8-fdbd297631c0 | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,111 | supabase-export-v2 | 090cf5037c4b5a7c | readable, and both readable and writable, respectively. :class:`BufferedRandom` provides a buffered interface to seekable streams. Another :class:`BufferedIOBase` subclass, :class:`BytesIO`, is a stream of in-memory bytes.
The :class:`TextIOBase` ABC extends :class:`IOBase`. It deals with
streams whose bytes represent ... | trusted_official_docs | CPython Docs | readable, and both readable and writable, respectively. :class:`BufferedRandom` provides a buffered interface to seekable streams. Another :class:`BufferedIOBase` subclass, :class:`BytesIO`, is a stream of in-memory bytes.
The :class:`TextIOBase` ABC extends :class:`IOBase`. It deals with
streams whose bytes represent ... | readable, and both readable and writable, respectively. :class:`BufferedRandom` provides a buffered interface to seekable streams. Another :class:`BufferedIOBase` subclass, :class:`BytesIO`, is a stream of in-memory bytes.
The :class:`TextIOBase` ABC extends :class:`IOBase`. It deals with
streams whose bytes represent ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
093b97c2-c01a-48ba-bff7-76d82b29d58c | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,252 | supabase-export-v2 | 1962dca1327b789d | A buffered binary stream providing higher-level access to a readable, non seekable :class:`RawIOBase` raw binary stream. It inherits from :class:`BufferedIOBase`.
When reading data from this object, a larger amount of data may be
requested from the underlying raw stream, and kept in an internal buffer. The buffered da... | trusted_official_docs | CPython Docs | A buffered binary stream providing higher-level access to a readable, non seekable :class:`RawIOBase` raw binary stream. It inherits from :class:`BufferedIOBase`.
When reading data from this object, a larger amount of data may be
requested from the underlying raw stream, and kept in an internal buffer. The buffered da... | A buffered binary stream providing higher-level access to a readable, non seekable :class:`RawIOBase` raw binary stream. It inherits from :class:`BufferedIOBase`.
When reading data from this object, a larger amount of data may be
requested from the underlying raw stream, and kept in an internal buffer. The buffered da... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
093e3023-ddf6-4ad6-9713-9c0b6d1ee11a | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,219 | supabase-export-v2 | 192ce7965036a77f | resulting :class:`FileIO` object will give access. When the FileIO object is closed this fd will be closed as well, unless *closefd* is set to ``False``.
The *mode* can be ``'r'``, ``'w'``, ``'x'`` or ``'a'`` for reading
(default), writing, exclusive creation or appending. The file will be
created if it doesn't exist... | trusted_official_docs | CPython Docs | resulting :class:`FileIO` object will give access. When the FileIO object is closed this fd will be closed as well, unless *closefd* is set to ``False``.
The *mode* can be ``'r'``, ``'w'``, ``'x'`` or ``'a'`` for reading
(default), writing, exclusive creation or appending. The file will be
created if it doesn't exist... | resulting :class:`FileIO` object will give access. When the FileIO object is closed this fd will be closed as well, unless *closefd* is set to ``False``.
The *mode* can be ``'r'``, ``'w'``, ``'x'`` or ``'a'`` for reading
(default), writing, exclusive creation or appending. The file will be
created if it doesn't exist... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0ac0c751-4251-46be-a0e6-f2aca294c72b | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,354 | supabase-export-v2 | b42b4bcd1e64f006 | works like that of :class:`TextIOWrapper`, except that when writing output to the stream, if *newline* is ``None``, newlines are written as ``\n`` on all platforms.
:class:`StringIO` provides this method in addition to those from
:class:`TextIOBase` and :class:`IOBase`: | trusted_official_docs | CPython Docs | works like that of :class:`TextIOWrapper`, except that when writing output to the stream, if *newline* is ``None``, newlines are written as ``\n`` on all platforms.
:class:`StringIO` provides this method in addition to those from
:class:`TextIOBase` and :class:`IOBase`: | works like that of :class:`TextIOWrapper`, except that when writing output to the stream, if *newline* is ``None``, newlines are written as ``\n`` on all platforms.
:class:`StringIO` provides this method in addition to those from
:class:`TextIOBase` and :class:`IOBase`: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0b7cf49f-da16-4496-b067-95b1b789646a | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,337 | supabase-export-v2 | ee09d65be558db01 | change the encoding or newline if some data has already been read from the stream. On the other hand, changing encoding after write is possible.
This method does an implicit stream flush before setting the
new parameters. | trusted_official_docs | CPython Docs | change the encoding or newline if some data has already been read from the stream. On the other hand, changing encoding after write is possible.
This method does an implicit stream flush before setting the
new parameters. | change the encoding or newline if some data has already been read from the stream. On the other hand, changing encoding after write is possible.
This method does an implicit stream flush before setting the
new parameters. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0e9a1692-5bbd-4208-8e20-3d55563551ff | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,191 | supabase-export-v2 | e17f725dd9f33dcb | After the raw stream has been detached, the buffer is in an unusable state.
Some buffers, like :class:`BytesIO`, do not have the concept of a single
raw stream to return from this method. They raise
:exc:`UnsupportedOperation`. | trusted_official_docs | CPython Docs | After the raw stream has been detached, the buffer is in an unusable state.
Some buffers, like :class:`BytesIO`, do not have the concept of a single
raw stream to return from this method. They raise
:exc:`UnsupportedOperation`. | After the raw stream has been detached, the buffer is in an unusable state.
Some buffers, like :class:`BytesIO`, do not have the concept of a single
raw stream to return from this method. They raise
:exc:`UnsupportedOperation`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0eb6ed6d-61e9-4bb1-8c75-71ff420cfb93 | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,392 | supabase-export-v2 | ad3aa924e4530ce7 | Reentrancy ^^^^^^^^^^
Binary buffered objects (instances of :class:`BufferedReader`,
:class:`BufferedWriter`, :class:`BufferedRandom` and :class:`BufferedRWPair`)
are not reentrant. While reentrant calls will not happen in normal situations,
they can arise from doing I/O in a :mod:`signal` handler. If a thread tries to... | trusted_official_docs | CPython Docs | Reentrancy ^^^^^^^^^^
Binary buffered objects (instances of :class:`BufferedReader`,
:class:`BufferedWriter`, :class:`BufferedRandom` and :class:`BufferedRWPair`)
are not reentrant. While reentrant calls will not happen in normal situations,
they can arise from doing I/O in a :mod:`signal` handler. If a thread tries to... | Reentrancy ^^^^^^^^^^
Binary buffered objects (instances of :class:`BufferedReader`,
:class:`BufferedWriter`, :class:`BufferedRandom` and :class:`BufferedRWPair`)
are not reentrant. While reentrant calls will not happen in normal situations,
they can arise from doing I/O in a :mod:`signal` handler. If a thread tries to... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
12981c0f-3291-4f68-85a5-b77008140daf | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,218 | supabase-export-v2 | 31e5a341316b9306 | The *name* can be one of two things:
* a character string or :class:`bytes` object representing the path to the
file which will be opened. In this case closefd must be ``True`` (the default)
otherwise an error will be raised. * an integer representing the number of an existing OS-level file descriptor
to which the r... | trusted_official_docs | CPython Docs | The *name* can be one of two things:
* a character string or :class:`bytes` object representing the path to the
file which will be opened. In this case closefd must be ``True`` (the default)
otherwise an error will be raised. * an integer representing the number of an existing OS-level file descriptor
to which the r... | The *name* can be one of two things:
* a character string or :class:`bytes` object representing the path to the
file which will be opened. In this case closefd must be ``True`` (the default)
otherwise an error will be raised. * an integer representing the number of an existing OS-level file descriptor
to which the r... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
14f3c068-2d9f-4a63-aa1c-d4d2f41b0e10 | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,241 | supabase-export-v2 | 762975a2aca67243 | >>> b = io.BytesIO(b"abcdef") >>> view = b.getbuffer() >>> view[2:4] = b"56" >>> b.getvalue() b'ab56ef'
.. note::
As long as the view exists, the :class:`BytesIO` object cannot be
resized or closed. | trusted_official_docs | CPython Docs | >>> b = io.BytesIO(b"abcdef") >>> view = b.getbuffer() >>> view[2:4] = b"56" >>> b.getvalue() b'ab56ef'
.. note::
As long as the view exists, the :class:`BytesIO` object cannot be
resized or closed. | >>> b = io.BytesIO(b"abcdef") >>> view = b.getbuffer() >>> view[2:4] = b"56" >>> b.getvalue() b'ab56ef'
.. note::
As long as the view exists, the :class:`BytesIO` object cannot be
resized or closed. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
17d45dd0-f633-4bfe-b099-2a22a9ce624d | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,212 | supabase-export-v2 | d6d3bdd2ce3300ae | Depending on the actual implementation, these bytes may be readily written to the underlying stream, or held in a buffer for performance and latency reasons.
When in non-blocking mode, a :exc:`BlockingIOError` is raised if the
data needed to be written to the raw stream but it couldn't accept
all the data without blo... | trusted_official_docs | CPython Docs | Depending on the actual implementation, these bytes may be readily written to the underlying stream, or held in a buffer for performance and latency reasons.
When in non-blocking mode, a :exc:`BlockingIOError` is raised if the
data needed to be written to the raw stream but it couldn't accept
all the data without blo... | Depending on the actual implementation, these bytes may be readily written to the underlying stream, or held in a buffer for performance and latency reasons.
When in non-blocking mode, a :exc:`BlockingIOError` is raised if the
data needed to be written to the raw stream but it couldn't accept
all the data without blo... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
181811c6-e991-4995-a87c-409b98cfa88c | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,367 | supabase-export-v2 | 887301c1f150a500 | .. class:: Reader[T]
Generic protocol for reading from a file or other input stream. ``T`` will
usually be :class:`str` or :class:`bytes`, but can be any type that is
read from the stream. | trusted_official_docs | CPython Docs | .. class:: Reader[T]
Generic protocol for reading from a file or other input stream. ``T`` will
usually be :class:`str` or :class:`bytes`, but can be any type that is
read from the stream. | .. class:: Reader[T]
Generic protocol for reading from a file or other input stream. ``T`` will
usually be :class:`str` or :class:`bytes`, but can be any type that is
read from the stream. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1865aefe-2e2f-4020-946e-197cd2d5f841 | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,075 | supabase-export-v2 | 42afc44731606a1b | .. versionadded:: 3.10 See :pep:`597` for more details.
To find where the default locale encoding is used, you can enable
the :option:`-X warn_default_encoding <-X>` command line option or set the
:envvar:`PYTHONWARNDEFAULTENCODING` environment variable, which will
emit an :exc:`EncodingWarning` when the default encodi... | trusted_official_docs | CPython Docs | .. versionadded:: 3.10 See :pep:`597` for more details.
To find where the default locale encoding is used, you can enable
the :option:`-X warn_default_encoding <-X>` command line option or set the
:envvar:`PYTHONWARNDEFAULTENCODING` environment variable, which will
emit an :exc:`EncodingWarning` when the default encodi... | .. versionadded:: 3.10 See :pep:`597` for more details.
To find where the default locale encoding is used, you can enable
the :option:`-X warn_default_encoding <-X>` command line option or set the
:envvar:`PYTHONWARNDEFAULTENCODING` environment variable, which will
emit an :exc:`EncodingWarning` when the default encodi... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1b2b15c9-ba46-4b3b-bfd2-9733380fae49 | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,292 | supabase-export-v2 | f3b49494a31d4e9b | .. attribute:: buffer
The underlying binary buffer (a :class:`BufferedIOBase`
or :class:`RawIOBase` instance) that :class:`TextIOBase` deals with. This is not part of the :class:`TextIOBase` API and may not exist
in some implementations. | trusted_official_docs | CPython Docs | .. attribute:: buffer
The underlying binary buffer (a :class:`BufferedIOBase`
or :class:`RawIOBase` instance) that :class:`TextIOBase` deals with. This is not part of the :class:`TextIOBase` API and may not exist
in some implementations. | .. attribute:: buffer
The underlying binary buffer (a :class:`BufferedIOBase`
or :class:`RawIOBase` instance) that :class:`TextIOBase` deals with. This is not part of the :class:`TextIOBase` API and may not exist
in some implementations. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1d811994-6054-45c7-8908-911cfc7fad25 | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,335 | supabase-export-v2 | 31045048b42262ba | Reconfigure this text stream using new settings for *encoding*, *errors*, *newline*, *line_buffering* and *write_through*.
Parameters not specified keep current settings, except
``errors='strict'`` is used when *encoding* is specified but
*errors* is not specified. | trusted_official_docs | CPython Docs | Reconfigure this text stream using new settings for *encoding*, *errors*, *newline*, *line_buffering* and *write_through*.
Parameters not specified keep current settings, except
``errors='strict'`` is used when *encoding* is specified but
*errors* is not specified. | Reconfigure this text stream using new settings for *encoding*, *errors*, *newline*, *line_buffering* and *write_through*.
Parameters not specified keep current settings, except
``errors='strict'`` is used when *encoding* is specified but
*errors* is not specified. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1ff84ba9-a9d6-4ff3-837d-02cb250beae9 | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,150 | supabase-export-v2 | a5a48901ed98b33a | * :data:`os.SEEK_CUR` or ``1`` -- current stream position; *offset* may be negative * :data:`os.SEEK_END` or ``2`` -- end of the stream; *offset* is usually negative
.. versionadded:: 3.1
The :data:`!SEEK_*` constants. | trusted_official_docs | CPython Docs | * :data:`os.SEEK_CUR` or ``1`` -- current stream position; *offset* may be negative * :data:`os.SEEK_END` or ``2`` -- end of the stream; *offset* is usually negative
.. versionadded:: 3.1
The :data:`!SEEK_*` constants. | * :data:`os.SEEK_CUR` or ``1`` -- current stream position; *offset* may be negative * :data:`os.SEEK_END` or ``2`` -- end of the stream; *offset* is usually negative
.. versionadded:: 3.1
The :data:`!SEEK_*` constants. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
25e26b13-a0cb-4e24-a9d3-e5dfbe85243c | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,092 | supabase-export-v2 | 81f55ef690f1a94d | This function returns *encoding* if it is not ``None``. Otherwise, it returns ``"locale"`` or ``"utf-8"`` depending on :ref:`UTF-8 Mode <utf8-mode>`.
This function emits an :class:`EncodingWarning` if
:data:`sys.flags.warn_default_encoding <sys.flags>` is true and *encoding*
is ``None``. *stacklevel* specifies where ... | trusted_official_docs | CPython Docs | This function returns *encoding* if it is not ``None``. Otherwise, it returns ``"locale"`` or ``"utf-8"`` depending on :ref:`UTF-8 Mode <utf8-mode>`.
This function emits an :class:`EncodingWarning` if
:data:`sys.flags.warn_default_encoding <sys.flags>` is true and *encoding*
is ``None``. *stacklevel* specifies where ... | This function returns *encoding* if it is not ``None``. Otherwise, it returns ``"locale"`` or ``"utf-8"`` depending on :ref:`UTF-8 Mode <utf8-mode>`.
This function emits an :class:`EncodingWarning` if
:data:`sys.flags.warn_default_encoding <sys.flags>` is true and *encoding*
is ``None``. *stacklevel* specifies where ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
268a3bcf-75bc-4097-94eb-cc45cdb9739f | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,209 | supabase-export-v2 | 94abeb5b355f2f33 | pre-allocated, writable :term:`bytes-like object` *b*, using at most one call to the underlying raw stream's :meth:`~RawIOBase.read` (or :meth:`~RawIOBase.readinto`) method. Return the number of bytes read.
A :exc:`BlockingIOError` is raised if the underlying raw stream is in non
blocking-mode, and has no data availab... | trusted_official_docs | CPython Docs | pre-allocated, writable :term:`bytes-like object` *b*, using at most one call to the underlying raw stream's :meth:`~RawIOBase.read` (or :meth:`~RawIOBase.readinto`) method. Return the number of bytes read.
A :exc:`BlockingIOError` is raised if the underlying raw stream is in non
blocking-mode, and has no data availab... | pre-allocated, writable :term:`bytes-like object` *b*, using at most one call to the underlying raw stream's :meth:`~RawIOBase.read` (or :meth:`~RawIOBase.readinto`) method. Return the number of bytes read.
A :exc:`BlockingIOError` is raised if the underlying raw stream is in non
blocking-mode, and has no data availab... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
287072d4-ead8-4f52-84db-8953dfd6c639 | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,168 | supabase-export-v2 | 87f4b245a826a996 | to encapsulate it in high-level primitives (this functionality is done at a higher-level in buffered binary streams and text streams, described later in this page).
:class:`RawIOBase` provides these methods in addition to those from
:class:`IOBase`: | trusted_official_docs | CPython Docs | to encapsulate it in high-level primitives (this functionality is done at a higher-level in buffered binary streams and text streams, described later in this page).
:class:`RawIOBase` provides these methods in addition to those from
:class:`IOBase`: | to encapsulate it in high-level primitives (this functionality is done at a higher-level in buffered binary streams and text streams, described later in this page).
:class:`RawIOBase` provides these methods in addition to those from
:class:`IOBase`: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
28a1112c-cc54-484c-ae52-5aff97e840f6 | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,383 | supabase-export-v2 | 4c9e3e130129e8f5 | Binary I/O ^^^^^^^^^^
By reading and writing only large chunks of data even when the user asks for a
single byte, buffered I/O hides any inefficiency in calling and executing the
operating system's unbuffered I/O routines. The gain depends on the OS and the
kind of I/O which is performed. For example, on some modern OS... | trusted_official_docs | CPython Docs | Binary I/O ^^^^^^^^^^
By reading and writing only large chunks of data even when the user asks for a
single byte, buffered I/O hides any inefficiency in calling and executing the
operating system's unbuffered I/O routines. The gain depends on the OS and the
kind of I/O which is performed. For example, on some modern OS... | Binary I/O ^^^^^^^^^^
By reading and writing only large chunks of data even when the user asks for a
single byte, buffered I/O hides any inefficiency in calling and executing the
operating system's unbuffered I/O routines. The gain depends on the OS and the
kind of I/O which is performed. For example, on some modern OS... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2a2e0c3f-553b-4bda-bdc7-ce0879db288b | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,054 | supabase-export-v2 | 0339f09c8b849714 | category of streams can be used for all kinds of non-text data, and also when manual control over the handling of text data is desired.
The easiest way to create a binary stream is with :meth:`open` with ``'b'`` in
the mode string:: | trusted_official_docs | CPython Docs | category of streams can be used for all kinds of non-text data, and also when manual control over the handling of text data is desired.
The easiest way to create a binary stream is with :meth:`open` with ``'b'`` in
the mode string:: | category of streams can be used for all kinds of non-text data, and also when manual control over the handling of text data is desired.
The easiest way to create a binary stream is with :meth:`open` with ``'b'`` in
the mode string:: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2c1170db-ae53-4720-9f85-e3b092bd6350 | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,120 | supabase-export-v2 | 7b2b7a03a4566ffc | empty abstract implementations for many methods that derived classes can override selectively; the default implementations represent a file that cannot be read, written or seeked.
Even though :class:`IOBase` does not declare :meth:`!read`
or :meth:`!write` because their signatures will vary, implementations and
clien... | trusted_official_docs | CPython Docs | empty abstract implementations for many methods that derived classes can override selectively; the default implementations represent a file that cannot be read, written or seeked.
Even though :class:`IOBase` does not declare :meth:`!read`
or :meth:`!write` because their signatures will vary, implementations and
clien... | empty abstract implementations for many methods that derived classes can override selectively; the default implementations represent a file that cannot be read, written or seeked.
Even though :class:`IOBase` does not declare :meth:`!read`
or :meth:`!write` because their signatures will vary, implementations and
clien... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2c92c90e-8d0a-49b4-8ed1-c03c5039455f | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,123 | supabase-export-v2 | 4f613f4cc6ee8339 | Note that calling any method (even inquiries) on a closed stream is undefined. Implementations may raise :exc:`ValueError` in this case.
:class:`IOBase` (and its subclasses) supports the iterator protocol, meaning
that an :class:`IOBase` object can be iterated over yielding the lines in a
stream. Lines are defined sl... | trusted_official_docs | CPython Docs | Note that calling any method (even inquiries) on a closed stream is undefined. Implementations may raise :exc:`ValueError` in this case.
:class:`IOBase` (and its subclasses) supports the iterator protocol, meaning
that an :class:`IOBase` object can be iterated over yielding the lines in a
stream. Lines are defined sl... | Note that calling any method (even inquiries) on a closed stream is undefined. Implementations may raise :exc:`ValueError` in this case.
:class:`IOBase` (and its subclasses) supports the iterator protocol, meaning
that an :class:`IOBase` object can be iterated over yielding the lines in a
stream. Lines are defined sl... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2e05c2dd-f6a6-4779-af5c-2d419700e0f1 | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,121 | supabase-export-v2 | 00fd0795e596fbfe | clients should consider those methods part of the interface. Also, implementations may raise a :exc:`ValueError` (or :exc:`UnsupportedOperation`) when operations they do not support are called.
The basic type used for binary data read from or written to a file is
:class:`bytes`. Other :term:`bytes-like objects <bytes-... | trusted_official_docs | CPython Docs | clients should consider those methods part of the interface. Also, implementations may raise a :exc:`ValueError` (or :exc:`UnsupportedOperation`) when operations they do not support are called.
The basic type used for binary data read from or written to a file is
:class:`bytes`. Other :term:`bytes-like objects <bytes-... | clients should consider those methods part of the interface. Also, implementations may raise a :exc:`ValueError` (or :exc:`UnsupportedOperation`) when operations they do not support are called.
The basic type used for binary data read from or written to a file is
:class:`bytes`. Other :term:`bytes-like objects <bytes-... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2ea9a39b-cb91-46e9-9c7b-ba868fb252ec | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,148 | supabase-export-v2 | 1875ffbc99f09854 | .. method:: seek(offset, whence=os.SEEK_SET, /)
Change the stream position to the given byte *offset*,
interpreted relative to the position indicated by *whence*,
and return the new absolute position. Values for *whence* are: | trusted_official_docs | CPython Docs | .. method:: seek(offset, whence=os.SEEK_SET, /)
Change the stream position to the given byte *offset*,
interpreted relative to the position indicated by *whence*,
and return the new absolute position. Values for *whence* are: | .. method:: seek(offset, whence=os.SEEK_SET, /)
Change the stream position to the given byte *offset*,
interpreted relative to the position indicated by *whence*,
and return the new absolute position. Values for *whence* are: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2eaae0a4-11e6-4eb5-841e-6256d565284c | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,109 | supabase-export-v2 | 6caa990070ebb495 | that there is no separation between reading and writing to streams; implementations are allowed to raise :exc:`UnsupportedOperation` if they do not support a given operation.
The :class:`RawIOBase` ABC extends :class:`IOBase`. It deals with the reading
and writing of bytes to a stream. :class:`FileIO` subclasses :class... | trusted_official_docs | CPython Docs | that there is no separation between reading and writing to streams; implementations are allowed to raise :exc:`UnsupportedOperation` if they do not support a given operation.
The :class:`RawIOBase` ABC extends :class:`IOBase`. It deals with the reading
and writing of bytes to a stream. :class:`FileIO` subclasses :class... | that there is no separation between reading and writing to streams; implementations are allowed to raise :exc:`UnsupportedOperation` if they do not support a given operation.
The :class:`RawIOBase` ABC extends :class:`IOBase`. It deals with the reading
and writing of bytes to a stream. :class:`FileIO` subclasses :class... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2fd2f30b-4067-4f6d-a948-a338655a388f | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,221 | supabase-export-v2 | e731bbc3258a9475 | The :meth:`~RawIOBase.read` (when called with a positive argument), :meth:`~RawIOBase.readinto` and :meth:`~RawIOBase.write` methods on this class will only make one system call.
A custom opener can be used by passing a callable as *opener*. The underlying
file descriptor for the file object is then obtained by callin... | trusted_official_docs | CPython Docs | The :meth:`~RawIOBase.read` (when called with a positive argument), :meth:`~RawIOBase.readinto` and :meth:`~RawIOBase.write` methods on this class will only make one system call.
A custom opener can be used by passing a callable as *opener*. The underlying
file descriptor for the file object is then obtained by callin... | The :meth:`~RawIOBase.read` (when called with a positive argument), :meth:`~RawIOBase.readinto` and :meth:`~RawIOBase.write` methods on this class will only make one system call.
A custom opener can be used by passing a callable as *opener*. The underlying
file descriptor for the file object is then obtained by callin... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
32238f7e-5135-4b76-9b93-7d1423ad6d4b | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,076 | supabase-export-v2 | b68c26936cb8c54e | enable the :option:`-X warn_default_encoding <-X>` command line option or set the :envvar:`PYTHONWARNDEFAULTENCODING` environment variable, which will emit an :exc:`EncodingWarning` when the default encoding is used.
If you are providing an API that uses :func:`open` or
:class:`TextIOWrapper` and passes ``encoding=None... | trusted_official_docs | CPython Docs | enable the :option:`-X warn_default_encoding <-X>` command line option or set the :envvar:`PYTHONWARNDEFAULTENCODING` environment variable, which will emit an :exc:`EncodingWarning` when the default encoding is used.
If you are providing an API that uses :func:`open` or
:class:`TextIOWrapper` and passes ``encoding=None... | enable the :option:`-X warn_default_encoding <-X>` command line option or set the :envvar:`PYTHONWARNDEFAULTENCODING` environment variable, which will emit an :exc:`EncodingWarning` when the default encoding is used.
If you are providing an API that uses :func:`open` or
:class:`TextIOWrapper` and passes ``encoding=None... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
33b2225a-a0fa-49e7-8fa3-fd23350dccd3 | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,162 | supabase-export-v2 | 0d07afeafae45b3d | .. method:: writelines(lines, /)
Write a list of lines to the stream. Line separators are not added, so it
is usual for each of the lines provided to have a line separator at the
end. | trusted_official_docs | CPython Docs | .. method:: writelines(lines, /)
Write a list of lines to the stream. Line separators are not added, so it
is usual for each of the lines provided to have a line separator at the
end. | .. method:: writelines(lines, /)
Write a list of lines to the stream. Line separators are not added, so it
is usual for each of the lines provided to have a line separator at the
end. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
33e01b77-9b54-4d99-8512-890327945bac | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,051 | supabase-export-v2 | 72272ea57261bb6e | with a non-blocking stream, be aware that read operations on text I/O objects might raise a :exc:`BlockingIOError` if the stream cannot perform the operation immediately.
The text stream API is described in detail in the documentation of
:class:`TextIOBase`. | trusted_official_docs | CPython Docs | with a non-blocking stream, be aware that read operations on text I/O objects might raise a :exc:`BlockingIOError` if the stream cannot perform the operation immediately.
The text stream API is described in detail in the documentation of
:class:`TextIOBase`. | with a non-blocking stream, be aware that read operations on text I/O objects might raise a :exc:`BlockingIOError` if the stream cannot perform the operation immediately.
The text stream API is described in detail in the documentation of
:class:`TextIOBase`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3519f87f-70a5-4169-8880-322f6b0495da | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,220 | supabase-export-v2 | 09f2296d9e67c041 | creating implies writing, so this mode behaves in a similar way to ``'w'``. Add a ``'+'`` to the mode to allow simultaneous reading and writing.
The :meth:`~RawIOBase.read` (when called with a positive argument),
:meth:`~RawIOBase.readinto` and :meth:`~RawIOBase.write` methods on this
class will only make one system ... | trusted_official_docs | CPython Docs | creating implies writing, so this mode behaves in a similar way to ``'w'``. Add a ``'+'`` to the mode to allow simultaneous reading and writing.
The :meth:`~RawIOBase.read` (when called with a positive argument),
:meth:`~RawIOBase.readinto` and :meth:`~RawIOBase.write` methods on this
class will only make one system ... | creating implies writing, so this mode behaves in a similar way to ``'w'``. Add a ``'+'`` to the mode to allow simultaneous reading and writing.
The :meth:`~RawIOBase.read` (when called with a positive argument),
:meth:`~RawIOBase.readinto` and :meth:`~RawIOBase.write` methods on this
class will only make one system ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
386bbf05-1ef5-4a4a-8fe9-41ed39fba067 | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,125 | supabase-export-v2 | 7e7ffe59b9a90463 | context manager and therefore supports the :keyword:`with` statement. In this example, *file* is closed after the :keyword:`!with` statement's suite is finished---even if an exception occurs::
with open('spam.txt', 'w') as file:
file.write('Spam and eggs!') | trusted_official_docs | CPython Docs | context manager and therefore supports the :keyword:`with` statement. In this example, *file* is closed after the :keyword:`!with` statement's suite is finished---even if an exception occurs::
with open('spam.txt', 'w') as file:
file.write('Spam and eggs!') | context manager and therefore supports the :keyword:`with` statement. In this example, *file* is closed after the :keyword:`!with` statement's suite is finished---even if an exception occurs::
with open('spam.txt', 'w') as file:
file.write('Spam and eggs!') | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
38e3d465-30c7-4d9f-be4f-07a2d6af3009 | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,239 | supabase-export-v2 | c1976d4e1a15a6da | .. method:: getbuffer()
Return a readable and writable view over the contents of the buffer
without copying them. Also, mutating the view will transparently
update the contents of the buffer:: | trusted_official_docs | CPython Docs | .. method:: getbuffer()
Return a readable and writable view over the contents of the buffer
without copying them. Also, mutating the view will transparently
update the contents of the buffer:: | .. method:: getbuffer()
Return a readable and writable view over the contents of the buffer
without copying them. Also, mutating the view will transparently
update the contents of the buffer:: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3a9cea3c-0386-4513-af7d-6e495e8b891a | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,122 | supabase-export-v2 | d139b75f5b096749 | or written to a file is :class:`bytes`. Other :term:`bytes-like objects <bytes-like object>` are accepted as method arguments too. Text I/O classes work with :class:`str` data.
Note that calling any method (even inquiries) on a closed stream is
undefined. Implementations may raise :exc:`ValueError` in this case. | trusted_official_docs | CPython Docs | or written to a file is :class:`bytes`. Other :term:`bytes-like objects <bytes-like object>` are accepted as method arguments too. Text I/O classes work with :class:`str` data.
Note that calling any method (even inquiries) on a closed stream is
undefined. Implementations may raise :exc:`ValueError` in this case. | or written to a file is :class:`bytes`. Other :term:`bytes-like objects <bytes-like object>` are accepted as method arguments too. Text I/O classes work with :class:`str` data.
Note that calling any method (even inquiries) on a closed stream is
undefined. Implementations may raise :exc:`ValueError` in this case. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3ab792c1-b79d-4602-883b-d683089d6376 | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,213 | supabase-export-v2 | 4fbddbc6c42d9345 | mode, a :exc:`BlockingIOError` is raised if the data needed to be written to the raw stream but it couldn't accept all the data without blocking.
The caller may release or mutate *b* after this method returns,
so the implementation should only access *b* during the method call. | trusted_official_docs | CPython Docs | mode, a :exc:`BlockingIOError` is raised if the data needed to be written to the raw stream but it couldn't accept all the data without blocking.
The caller may release or mutate *b* after this method returns,
so the implementation should only access *b* during the method call. | mode, a :exc:`BlockingIOError` is raised if the data needed to be written to the raw stream but it couldn't accept all the data without blocking.
The caller may release or mutate *b* after this method returns,
so the implementation should only access *b* during the method call. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3ae31e7c-7621-4c91-b44b-d0822d097a37 | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,144 | supabase-export-v2 | d91ef72ab652cdbd | .. method:: readlines(hint=-1, /)
Read and return a list of lines from the stream. *hint* can be specified
to control the number of lines read: no more lines will be read if the
total size (in bytes/characters) of all lines so far exceeds *hint*. | trusted_official_docs | CPython Docs | .. method:: readlines(hint=-1, /)
Read and return a list of lines from the stream. *hint* can be specified
to control the number of lines read: no more lines will be read if the
total size (in bytes/characters) of all lines so far exceeds *hint*. | .. method:: readlines(hint=-1, /)
Read and return a list of lines from the stream. *hint* can be specified
to control the number of lines read: no more lines will be read if the
total size (in bytes/characters) of all lines so far exceeds *hint*. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
406d8450-ceb7-42f8-a8fa-e119699a1bce | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,067 | supabase-export-v2 | 4099f909f8858897 | since most Unix platforms use UTF-8 locale by default. This causes bugs because the locale encoding is not UTF-8 for most Windows users. For example::
# May not work on Windows when non-ASCII characters in the file. with open("README.md") as f:
long_description = f.read() | trusted_official_docs | CPython Docs | since most Unix platforms use UTF-8 locale by default. This causes bugs because the locale encoding is not UTF-8 for most Windows users. For example::
# May not work on Windows when non-ASCII characters in the file. with open("README.md") as f:
long_description = f.read() | since most Unix platforms use UTF-8 locale by default. This causes bugs because the locale encoding is not UTF-8 for most Windows users. For example::
# May not work on Windows when non-ASCII characters in the file. with open("README.md") as f:
long_description = f.read() | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
40fdce40-65d5-49d4-8360-763206db297f | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,206 | supabase-export-v2 | 61af2ea8e9a2ac0f | Like :meth:`read`, multiple reads may be issued to the underlying raw stream, unless the latter is interactive.
A :exc:`BlockingIOError` is raised if the underlying raw stream is in non
blocking-mode, and has no data available at the moment. | trusted_official_docs | CPython Docs | Like :meth:`read`, multiple reads may be issued to the underlying raw stream, unless the latter is interactive.
A :exc:`BlockingIOError` is raised if the underlying raw stream is in non
blocking-mode, and has no data available at the moment. | Like :meth:`read`, multiple reads may be issued to the underlying raw stream, unless the latter is interactive.
A :exc:`BlockingIOError` is raised if the underlying raw stream is in non
blocking-mode, and has no data available at the moment. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4378595d-482c-42e3-b7ab-b1e5b3bd8c6d | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,196 | supabase-export-v2 | bd55ac13b579094a | if specific errors are encountered, see :meth:`os.read` and :pep:`475` for more details. Less than size bytes being returned does not imply that EOF is imminent.
When reading as much as possible the default implementation will use
``raw.readall`` if available (which should implement
:meth:`RawIOBase.readall`), otherw... | trusted_official_docs | CPython Docs | if specific errors are encountered, see :meth:`os.read` and :pep:`475` for more details. Less than size bytes being returned does not imply that EOF is imminent.
When reading as much as possible the default implementation will use
``raw.readall`` if available (which should implement
:meth:`RawIOBase.readall`), otherw... | if specific errors are encountered, see :meth:`os.read` and :pep:`475` for more details. Less than size bytes being returned does not imply that EOF is imminent.
When reading as much as possible the default implementation will use
``raw.readall`` if available (which should implement
:meth:`RawIOBase.readall`), otherw... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
45a02c2b-a925-4bcd-a6a8-3780bb85ae4c | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,343 | supabase-export-v2 | 075bff333608434e | Four operations are supported, given by the following argument combinations:
* ``seek(0, SEEK_SET)``: Rewind to the start of the stream. * ``seek(cookie, SEEK_SET)``: Restore a previous position;
*cookie* **must be** a number returned by :meth:`tell`. * ``seek(0, SEEK_END)``: Fast-forward to the end of the stream. * `... | trusted_official_docs | CPython Docs | Four operations are supported, given by the following argument combinations:
* ``seek(0, SEEK_SET)``: Rewind to the start of the stream. * ``seek(cookie, SEEK_SET)``: Restore a previous position;
*cookie* **must be** a number returned by :meth:`tell`. * ``seek(0, SEEK_END)``: Fast-forward to the end of the stream. * `... | Four operations are supported, given by the following argument combinations:
* ``seek(0, SEEK_SET)``: Rewind to the start of the stream. * ``seek(cookie, SEEK_SET)``: Restore a previous position;
*cookie* **must be** a number returned by :meth:`tell`. * ``seek(0, SEEK_END)``: Fast-forward to the end of the stream. * `... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4781c910-fc57-4daf-8194-6850f3df3558 | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,087 | supabase-export-v2 | b7c03f1a717c46cd | *path* should be a :class:`str` and an absolute path.
The behavior of this function may be overridden by an earlier call to the
:c:func:`PyFile_SetOpenCodeHook`. However, assuming that *path* is a
:class:`str` and an absolute path, ``open_code(path)`` should always behave
the same as ``open(path, 'rb')``. Overriding... | trusted_official_docs | CPython Docs | *path* should be a :class:`str` and an absolute path.
The behavior of this function may be overridden by an earlier call to the
:c:func:`PyFile_SetOpenCodeHook`. However, assuming that *path* is a
:class:`str` and an absolute path, ``open_code(path)`` should always behave
the same as ``open(path, 'rb')``. Overriding... | *path* should be a :class:`str` and an absolute path.
The behavior of this function may be overridden by an earlier call to the
:c:func:`PyFile_SetOpenCodeHook`. However, assuming that *path* is a
:class:`str` and an absolute path, ``open_code(path)`` should always behave
the same as ``open(path, 'rb')``. Overriding... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4798e6fc-c92e-4e2b-957a-47ca97811f06 | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,172 | supabase-export-v2 | 110a0937206390a1 | and *size* was not 0, this indicates end of file. If the object is in non-blocking mode and no bytes are available, ``None`` is returned.
The default implementation defers to :meth:`readall` and
:meth:`readinto`. | trusted_official_docs | CPython Docs | and *size* was not 0, this indicates end of file. If the object is in non-blocking mode and no bytes are available, ``None`` is returned.
The default implementation defers to :meth:`readall` and
:meth:`readinto`. | and *size* was not 0, this indicates end of file. If the object is in non-blocking mode and no bytes are available, ``None`` is returned.
The default implementation defers to :meth:`readall` and
:meth:`readinto`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
487d6360-505a-4c04-9bf7-ebf11ed88a84 | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,240 | supabase-export-v2 | c69b5cc9b876bc6f | readable and writable view over the contents of the buffer without copying them. Also, mutating the view will transparently update the contents of the buffer::
>>> b = io.BytesIO(b"abcdef")
>>> view = b.getbuffer()
>>> view[2:4] = b"56"
>>> b.getvalue()
b'ab56ef' | trusted_official_docs | CPython Docs | readable and writable view over the contents of the buffer without copying them. Also, mutating the view will transparently update the contents of the buffer::
>>> b = io.BytesIO(b"abcdef")
>>> view = b.getbuffer()
>>> view[2:4] = b"56"
>>> b.getvalue()
b'ab56ef' | readable and writable view over the contents of the buffer without copying them. Also, mutating the view will transparently update the contents of the buffer::
>>> b = io.BytesIO(b"abcdef")
>>> view = b.getbuffer()
>>> view[2:4] = b"56"
>>> b.getvalue()
b'ab56ef' | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
49ea1c31-a4e8-4697-8974-22c88905df8a | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,271 | supabase-export-v2 | d43ad9f25feaca63 | .. method:: write(b, /)
Write the :term:`bytes-like object`, *b*, and return the
number of bytes written. When in non-blocking mode, a
:exc:`BlockingIOError` with :attr:`BlockingIOError.characters_written` set
is raised if the buffer needs to be written out but the raw stream blocks. | trusted_official_docs | CPython Docs | .. method:: write(b, /)
Write the :term:`bytes-like object`, *b*, and return the
number of bytes written. When in non-blocking mode, a
:exc:`BlockingIOError` with :attr:`BlockingIOError.characters_written` set
is raised if the buffer needs to be written out but the raw stream blocks. | .. method:: write(b, /)
Write the :term:`bytes-like object`, *b*, and return the
number of bytes written. When in non-blocking mode, a
:exc:`BlockingIOError` with :attr:`BlockingIOError.characters_written` set
is raised if the buffer needs to be written out but the raw stream blocks. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4b24a6ad-32c8-4f90-83a3-5c041367f2b2 | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,080 | supabase-export-v2 | c592f8ad3cda102d | An int containing the default buffer size used by the module's buffered I/O classes. :func:`open` uses the file's blksize (as obtained by :func:`os.stat`) if possible.
.. function:: open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None) | trusted_official_docs | CPython Docs | An int containing the default buffer size used by the module's buffered I/O classes. :func:`open` uses the file's blksize (as obtained by :func:`os.stat`) if possible.
.. function:: open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None) | An int containing the default buffer size used by the module's buffered I/O classes. :func:`open` uses the file's blksize (as obtained by :func:`os.stat`) if possible.
.. function:: open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4bf3d49b-b32b-493b-b562-40fb364779e5 | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,108 | supabase-export-v2 | cf2b4be94380dc9d | provide default implementations of some methods in order to help implementation of concrete stream classes. For example, :class:`BufferedIOBase` provides unoptimized implementations of :meth:`!readinto` and :meth:`!readline`.
At the top of the I/O hierarchy is the abstract base class :class:`IOBase`. It
defines the bas... | trusted_official_docs | CPython Docs | provide default implementations of some methods in order to help implementation of concrete stream classes. For example, :class:`BufferedIOBase` provides unoptimized implementations of :meth:`!readinto` and :meth:`!readline`.
At the top of the I/O hierarchy is the abstract base class :class:`IOBase`. It
defines the bas... | provide default implementations of some methods in order to help implementation of concrete stream classes. For example, :class:`BufferedIOBase` provides unoptimized implementations of :meth:`!readinto` and :meth:`!readline`.
At the top of the I/O hierarchy is the abstract base class :class:`IOBase`. It
defines the bas... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
50e32b3c-0e27-4cb2-9480-35c2cb9cd134 | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,322 | supabase-export-v2 | 3632cd9556cb8ad7 | ``True``, calls to :meth:`~BufferedIOBase.write` are guaranteed not to be buffered: any data written on the :class:`TextIOWrapper` object is immediately handled to its underlying binary *buffer*.
.. versionchanged:: 3.3
The *write_through* argument has been added. | trusted_official_docs | CPython Docs | ``True``, calls to :meth:`~BufferedIOBase.write` are guaranteed not to be buffered: any data written on the :class:`TextIOWrapper` object is immediately handled to its underlying binary *buffer*.
.. versionchanged:: 3.3
The *write_through* argument has been added. | ``True``, calls to :meth:`~BufferedIOBase.write` are guaranteed not to be buffered: any data written on the :class:`TextIOWrapper` object is immediately handled to its underlying binary *buffer*.
.. versionchanged:: 3.3
The *write_through* argument has been added. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
51901f84-eef1-49cd-a369-9cb754f5b439 | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,119 | supabase-export-v2 | bee8325cd7c23aea | The abstract base class for all I/O classes.
This class provides empty abstract implementations for many methods
that derived classes can override selectively; the default
implementations represent a file that cannot be read, written or
seeked. | trusted_official_docs | CPython Docs | The abstract base class for all I/O classes.
This class provides empty abstract implementations for many methods
that derived classes can override selectively; the default
implementations represent a file that cannot be read, written or
seeked. | The abstract base class for all I/O classes.
This class provides empty abstract implementations for many methods
that derived classes can override selectively; the default
implementations represent a file that cannot be read, written or
seeked. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
521f82b9-cf31-4b76-b899-dc8df8328d92 | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,061 | supabase-export-v2 | b741a59d410de2f3 | Raw I/O ^^^^^^^
Raw I/O (also called *unbuffered I/O*) is generally used as a low-level
building-block for binary and text streams; it is rarely useful to directly
manipulate a raw stream from user code. Nevertheless, you can create a raw
stream by opening a file in binary mode with buffering disabled:: | trusted_official_docs | CPython Docs | Raw I/O ^^^^^^^
Raw I/O (also called *unbuffered I/O*) is generally used as a low-level
building-block for binary and text streams; it is rarely useful to directly
manipulate a raw stream from user code. Nevertheless, you can create a raw
stream by opening a file in binary mode with buffering disabled:: | Raw I/O ^^^^^^^
Raw I/O (also called *unbuffered I/O*) is generally used as a low-level
building-block for binary and text streams; it is rarely useful to directly
manipulate a raw stream from user code. Nevertheless, you can create a raw
stream by opening a file in binary mode with buffering disabled:: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
522fb2df-b978-4923-bf43-5f33b91d5d65 | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,105 | supabase-export-v2 | 36296bfa9ebab4cd | Class hierarchy ---------------
The implementation of I/O streams is organized as a hierarchy of classes. First
:term:`abstract base classes <abstract base class>` (ABCs), which are used to
specify the various categories of streams, then concrete classes providing the
standard stream implementations. | trusted_official_docs | CPython Docs | Class hierarchy ---------------
The implementation of I/O streams is organized as a hierarchy of classes. First
:term:`abstract base classes <abstract base class>` (ABCs), which are used to
specify the various categories of streams, then concrete classes providing the
standard stream implementations. | Class hierarchy ---------------
The implementation of I/O streams is organized as a hierarchy of classes. First
:term:`abstract base classes <abstract base class>` (ABCs), which are used to
specify the various categories of streams, then concrete classes providing the
standard stream implementations. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
53874009-1c42-4cb8-88b7-73647850ef6f | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,266 | supabase-export-v2 | 8aafb3b7753a80b7 | pending data; * when :meth:`flush` is called; * when a :meth:`~IOBase.seek` is requested (for :class:`BufferedRandom` objects); * when the :class:`BufferedWriter` object is closed or destroyed.
The constructor creates a :class:`BufferedWriter` for the given writeable
*raw* stream. If the *buffer_size* is not given, it... | trusted_official_docs | CPython Docs | pending data; * when :meth:`flush` is called; * when a :meth:`~IOBase.seek` is requested (for :class:`BufferedRandom` objects); * when the :class:`BufferedWriter` object is closed or destroyed.
The constructor creates a :class:`BufferedWriter` for the given writeable
*raw* stream. If the *buffer_size* is not given, it... | pending data; * when :meth:`flush` is called; * when a :meth:`~IOBase.seek` is requested (for :class:`BufferedRandom` objects); * when the :class:`BufferedWriter` object is closed or destroyed.
The constructor creates a :class:`BufferedWriter` for the given writeable
*raw* stream. If the *buffer_size* is not given, it... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
54e898f1-af7d-46d4-afd0-cf1dc73a5f3c | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,302 | supabase-export-v2 | 12b890ed79556116 | Read until newline or EOF and return a single :class:`str`. If the stream is already at EOF, an empty string is returned.
If *size* is specified, at most *size* characters will be read. | trusted_official_docs | CPython Docs | Read until newline or EOF and return a single :class:`str`. If the stream is already at EOF, an empty string is returned.
If *size* is specified, at most *size* characters will be read. | Read until newline or EOF and return a single :class:`str`. If the stream is already at EOF, an empty string is returned.
If *size* is specified, at most *size* characters will be read. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
55d8e0d6-541d-4592-8d86-2a61278bac43 | CPython Docs | file://datasets/cpython/Doc/library/io.rst | unknown | 276b2877-761c-4c60-8688-e120997fe113 | 17,370 | supabase-export-v2 | 945b3a05ebfa6521 | .. method:: read() read(size, /)
Read data from the input stream and return it. If *size* is
specified, it should be an integer, and at most *size* items
(bytes/characters) will be read. | trusted_official_docs | CPython Docs | .. method:: read() read(size, /)
Read data from the input stream and return it. If *size* is
specified, it should be an integer, and at most *size* items
(bytes/characters) will be read. | .. method:: read() read(size, /)
Read data from the input stream and return it. If *size* is
specified, it should be an integer, and at most *size* items
(bytes/characters) will be read. | 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.