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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a653f0fd-a17c-43b5-8550-4d96f68c93cf | CPython Docs | file://datasets/cpython/Doc/library/dbm.rst | unknown | 4294c7e5-d3af-4119-a555-d541e9a0b9c3 | 7,436 | supabase-export-v2 | 1d8dbe57acbfb645 | the :meth:`!keys` and :meth:`!items` methods return lists, and the :meth:`!setdefault` method requires two arguments. It also supports a "closing" context manager via the :keyword:`with` keyword.
The following methods are also provided: | trusted_official_docs | CPython Docs | the :meth:`!keys` and :meth:`!items` methods return lists, and the :meth:`!setdefault` method requires two arguments. It also supports a "closing" context manager via the :keyword:`with` keyword.
The following methods are also provided: | the :meth:`!keys` and :meth:`!items` methods return lists, and the :meth:`!setdefault` method requires two arguments. It also supports a "closing" context manager via the :keyword:`with` keyword.
The following methods are also provided: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a7650e05-6319-4991-bbea-295ff98c87c7 | CPython Docs | file://datasets/cpython/Doc/library/dbm.rst | unknown | 4294c7e5-d3af-4119-a555-d541e9a0b9c3 | 7,317 | supabase-export-v2 | 5e801cfc26c61fa8 | .. versionchanged:: 3.2 :meth:`!get` and :meth:`!setdefault` methods are now available for all :mod:`!dbm` backends.
.. versionchanged:: 3.4
Added native support for the context management protocol to the objects
returned by :func:`~dbm.open`. | trusted_official_docs | CPython Docs | .. versionchanged:: 3.2 :meth:`!get` and :meth:`!setdefault` methods are now available for all :mod:`!dbm` backends.
.. versionchanged:: 3.4
Added native support for the context management protocol to the objects
returned by :func:`~dbm.open`. | .. versionchanged:: 3.2 :meth:`!get` and :meth:`!setdefault` methods are now available for all :mod:`!dbm` backends.
.. versionchanged:: 3.4
Added native support for the context management protocol to the objects
returned by :func:`~dbm.open`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b13add49-7d4e-4cda-9909-f6a0de3d47bc | CPython Docs | file://datasets/cpython/Doc/library/dbm.rst | unknown | 4294c7e5-d3af-4119-a555-d541e9a0b9c3 | 7,435 | supabase-export-v2 | e0f4f00e3209eb33 | .. versionchanged:: 3.11 *filename* accepts a :term:`path-like object`.
The returned database object behaves similar to a mutable :term:`mapping`,
but the :meth:`!keys` and :meth:`!items` methods return lists, and
the :meth:`!setdefault` method requires two arguments. It also supports a "closing" context manager via ... | trusted_official_docs | CPython Docs | .. versionchanged:: 3.11 *filename* accepts a :term:`path-like object`.
The returned database object behaves similar to a mutable :term:`mapping`,
but the :meth:`!keys` and :meth:`!items` methods return lists, and
the :meth:`!setdefault` method requires two arguments. It also supports a "closing" context manager via ... | .. versionchanged:: 3.11 *filename* accepts a :term:`path-like object`.
The returned database object behaves similar to a mutable :term:`mapping`,
but the :meth:`!keys` and :meth:`!items` methods return lists, and
the :meth:`!setdefault` method requires two arguments. It also supports a "closing" context manager via ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b592e631-ab9b-4b7f-ac50-4ce2ed8ceec2 | CPython Docs | file://datasets/cpython/Doc/library/dbm.rst | unknown | 4294c7e5-d3af-4119-a555-d541e9a0b9c3 | 7,369 | supabase-export-v2 | 6e7ebf61092116ab | The following additional characters may be appended to control how the database is opened:
* ``'f'``: Open the database in fast mode. Writes to the database will not be synchronized. * ``'s'``: Synchronized mode. Changes to the database will be written immediately to the file. * ``'u'``: Do not lock database. | trusted_official_docs | CPython Docs | The following additional characters may be appended to control how the database is opened:
* ``'f'``: Open the database in fast mode. Writes to the database will not be synchronized. * ``'s'``: Synchronized mode. Changes to the database will be written immediately to the file. * ``'u'``: Do not lock database. | The following additional characters may be appended to control how the database is opened:
* ``'f'``: Open the database in fast mode. Writes to the database will not be synchronized. * ``'s'``: Synchronized mode. Changes to the database will be written immediately to the file. * ``'u'``: Do not lock database. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bf0cd4d3-89dd-425c-8f96-56e6638af2a8 | CPython Docs | file://datasets/cpython/Doc/library/dbm.rst | unknown | 4294c7e5-d3af-4119-a555-d541e9a0b9c3 | 7,386 | supabase-export-v2 | 600dc7905597dd91 | of a database file except by using this reorganization; otherwise, deleted file space will be kept and reused as new (key, value) pairs are added.
.. note::
While reorganizing, as much as one time the size of the original database is required
in free disk space. However, be aware that this factor changes for each :mo... | trusted_official_docs | CPython Docs | of a database file except by using this reorganization; otherwise, deleted file space will be kept and reused as new (key, value) pairs are added.
.. note::
While reorganizing, as much as one time the size of the original database is required
in free disk space. However, be aware that this factor changes for each :mo... | of a database file except by using this reorganization; otherwise, deleted file space will be kept and reused as new (key, value) pairs are added.
.. note::
While reorganizing, as much as one time the size of the original database is required
in free disk space. However, be aware that this factor changes for each :mo... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c29d119f-9723-42ec-b7e1-abe35f44641c | CPython Docs | file://datasets/cpython/Doc/library/dbm.rst | unknown | 4294c7e5-d3af-4119-a555-d541e9a0b9c3 | 7,313 | supabase-export-v2 | 7c311e2ac5d4a960 | .. versionchanged:: 3.11 *file* accepts a :term:`path-like object`.
The object returned by :func:`~dbm.open` supports the basic
functionality of mutable :term:`mappings <mapping>`;
keys and their corresponding values can be stored, retrieved, and
deleted, and iteration, the :keyword:`in` operator and methods :meth:`!ke... | trusted_official_docs | CPython Docs | .. versionchanged:: 3.11 *file* accepts a :term:`path-like object`.
The object returned by :func:`~dbm.open` supports the basic
functionality of mutable :term:`mappings <mapping>`;
keys and their corresponding values can be stored, retrieved, and
deleted, and iteration, the :keyword:`in` operator and methods :meth:`!ke... | .. versionchanged:: 3.11 *file* accepts a :term:`path-like object`.
The object returned by :func:`~dbm.open` supports the basic
functionality of mutable :term:`mappings <mapping>`;
keys and their corresponding values can be stored, retrieved, and
deleted, and iteration, the :keyword:`in` operator and methods :meth:`!ke... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c6ae4ea5-3051-44c9-ae38-597cb5d0d730 | CPython Docs | file://datasets/cpython/Doc/library/dbm.rst | unknown | 4294c7e5-d3af-4119-a555-d541e9a0b9c3 | 7,310 | supabase-export-v2 | 5a2e67684a3169b8 | the appropriate module is used; if it does not exist, the first submodule listed above that can be imported is used. :type file: :term:`path-like object`
:param str flag:
* ``'r'`` (default): |flag_r|
* ``'w'``: |flag_w|
* ``'c'``: |flag_c|
* ``'n'``: |flag_n| | trusted_official_docs | CPython Docs | the appropriate module is used; if it does not exist, the first submodule listed above that can be imported is used. :type file: :term:`path-like object`
:param str flag:
* ``'r'`` (default): |flag_r|
* ``'w'``: |flag_w|
* ``'c'``: |flag_c|
* ``'n'``: |flag_n| | the appropriate module is used; if it does not exist, the first submodule listed above that can be imported is used. :type file: :term:`path-like object`
:param str flag:
* ``'r'`` (default): |flag_r|
* ``'w'``: |flag_w|
* ``'c'``: |flag_c|
* ``'n'``: |flag_n| | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ccff0bc0-ed57-485d-86be-08a0f8b600f1 | CPython Docs | file://datasets/cpython/Doc/library/dbm.rst | unknown | 4294c7e5-d3af-4119-a555-d541e9a0b9c3 | 7,343 | supabase-export-v2 | 85a472592994e8ed | * ``'r'`` (default): |flag_r| * ``'w'``: |flag_w| * ``'c'``: |flag_c| * ``'n'``: |flag_n|
:param mode:
The Unix file access mode of the file (default: octal ``0o666``),
used only when the database has to be created. | trusted_official_docs | CPython Docs | * ``'r'`` (default): |flag_r| * ``'w'``: |flag_w| * ``'c'``: |flag_c| * ``'n'``: |flag_n|
:param mode:
The Unix file access mode of the file (default: octal ``0o666``),
used only when the database has to be created. | * ``'r'`` (default): |flag_r| * ``'w'``: |flag_w| * ``'c'``: |flag_c| * ``'n'``: |flag_n|
:param mode:
The Unix file access mode of the file (default: octal ``0o666``),
used only when the database has to be created. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
da946df7-3fec-495d-ba9e-6f57dd571218 | CPython Docs | file://datasets/cpython/Doc/library/dbm.rst | unknown | 4294c7e5-d3af-4119-a555-d541e9a0b9c3 | 7,344 | supabase-export-v2 | 30f29723f291f556 | :param mode: The Unix file access mode of the file (default: octal ``0o666``), used only when the database has to be created.
The returned database object behaves similar to a mutable :term:`mapping`,
but the :meth:`!keys` method returns a list, and
the :meth:`!setdefault` method requires two arguments. It also suppo... | trusted_official_docs | CPython Docs | :param mode: The Unix file access mode of the file (default: octal ``0o666``), used only when the database has to be created.
The returned database object behaves similar to a mutable :term:`mapping`,
but the :meth:`!keys` method returns a list, and
the :meth:`!setdefault` method requires two arguments. It also suppo... | :param mode: The Unix file access mode of the file (default: octal ``0o666``), used only when the database has to be created.
The returned database object behaves similar to a mutable :term:`mapping`,
but the :meth:`!keys` method returns a list, and
the :meth:`!setdefault` method requires two arguments. It also suppo... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
db78efb2-de63-4f7e-8e01-47fd3c8514cb | CPython Docs | file://datasets/cpython/Doc/library/dbm.rst | unknown | 4294c7e5-d3af-4119-a555-d541e9a0b9c3 | 7,418 | supabase-export-v2 | 90e6a6252f02344a | .. note::
The :mod:`!dbm.dumb` module is intended as a last resort fallback for the
:mod:`!dbm` module when a more robust module is not available. The :mod:`!dbm.dumb`
module is not written for speed and is not nearly as heavily used as the other
database modules. | trusted_official_docs | CPython Docs | .. note::
The :mod:`!dbm.dumb` module is intended as a last resort fallback for the
:mod:`!dbm` module when a more robust module is not available. The :mod:`!dbm.dumb`
module is not written for speed and is not nearly as heavily used as the other
database modules. | .. note::
The :mod:`!dbm.dumb` module is intended as a last resort fallback for the
:mod:`!dbm` module when a more robust module is not available. The :mod:`!dbm.dumb`
module is not written for speed and is not nearly as heavily used as the other
database modules. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
db89165a-019a-49e7-b508-ff85a9c0f46f | CPython Docs | file://datasets/cpython/Doc/library/dbm.rst | unknown | 4294c7e5-d3af-4119-a555-d541e9a0b9c3 | 7,440 | supabase-export-v2 | bb90012e719aa904 | deletions and would like to shrink the space used on disk, this method will reorganize the database; otherwise, deleted file space will not be reused.
.. note::
While reorganizing, no additional free disk space is required. However, be aware
that this factor changes for each :mod:`!dbm` submodule. | trusted_official_docs | CPython Docs | deletions and would like to shrink the space used on disk, this method will reorganize the database; otherwise, deleted file space will not be reused.
.. note::
While reorganizing, no additional free disk space is required. However, be aware
that this factor changes for each :mod:`!dbm` submodule. | deletions and would like to shrink the space used on disk, this method will reorganize the database; otherwise, deleted file space will not be reused.
.. note::
While reorganizing, no additional free disk space is required. However, be aware
that this factor changes for each :mod:`!dbm` submodule. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e42ee1a1-a99e-4536-a2bb-753d2a6a04e2 | CPython Docs | file://datasets/cpython/Doc/library/dbm.rst | unknown | 4294c7e5-d3af-4119-a555-d541e9a0b9c3 | 7,434 | supabase-export-v2 | 9582b9a64bd88b0c | 3.8 A database opened read-only if *flag* is ``'r'``. A database is not created if it does not exist if *flag* is ``'r'`` or ``'w'``.
.. versionchanged:: 3.11
*filename* accepts a :term:`path-like object`. | trusted_official_docs | CPython Docs | 3.8 A database opened read-only if *flag* is ``'r'``. A database is not created if it does not exist if *flag* is ``'r'`` or ``'w'``.
.. versionchanged:: 3.11
*filename* accepts a :term:`path-like object`. | 3.8 A database opened read-only if *flag* is ``'r'``. A database is not created if it does not exist if *flag* is ``'r'`` or ``'w'``.
.. versionchanged:: 3.11
*filename* accepts a :term:`path-like object`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f2034c6a-97cb-4284-96b3-4e15b108dae5 | CPython Docs | file://datasets/cpython/Doc/library/dbm.rst | unknown | 4294c7e5-d3af-4119-a555-d541e9a0b9c3 | 7,314 | supabase-export-v2 | a6b8ab8abd251b3e | methods :meth:`!keys`, :meth:`!get`, :meth:`!setdefault` and :meth:`!clear` are available. The :meth:`!keys` method returns a list instead of a view object. The :meth:`!setdefault` method requires two arguments.
Key and values are always stored as :class:`bytes`. This means that when
strings are used they are implicitl... | trusted_official_docs | CPython Docs | methods :meth:`!keys`, :meth:`!get`, :meth:`!setdefault` and :meth:`!clear` are available. The :meth:`!keys` method returns a list instead of a view object. The :meth:`!setdefault` method requires two arguments.
Key and values are always stored as :class:`bytes`. This means that when
strings are used they are implicitl... | methods :meth:`!keys`, :meth:`!get`, :meth:`!setdefault` and :meth:`!clear` are available. The :meth:`!keys` method returns a list instead of a view object. The :meth:`!setdefault` method requires two arguments.
Key and values are always stored as :class:`bytes`. This means that when
strings are used they are implicitl... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f4379406-3faf-49a4-932b-fb39dca74965 | CPython Docs | file://datasets/cpython/Doc/library/dbm.rst | unknown | 4294c7e5-d3af-4119-a555-d541e9a0b9c3 | 7,336 | supabase-export-v2 | 07e90be7c0cd6a19 | --------------
This module uses the standard library :mod:`sqlite3` module to provide an
SQLite backend for the :mod:`!dbm` module. The files created by :mod:`!dbm.sqlite3` can thus be opened by :mod:`sqlite3`,
or any other SQLite browser, including the SQLite CLI. | trusted_official_docs | CPython Docs | --------------
This module uses the standard library :mod:`sqlite3` module to provide an
SQLite backend for the :mod:`!dbm` module. The files created by :mod:`!dbm.sqlite3` can thus be opened by :mod:`sqlite3`,
or any other SQLite browser, including the SQLite CLI. | --------------
This module uses the standard library :mod:`sqlite3` module to provide an
SQLite backend for the :mod:`!dbm` module. The files created by :mod:`!dbm.sqlite3` can thus be opened by :mod:`sqlite3`,
or any other SQLite browser, including the SQLite CLI. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f43b47be-7c56-4048-8583-41e48b95e998 | CPython Docs | file://datasets/cpython/Doc/library/dbm.rst | unknown | 4294c7e5-d3af-4119-a555-d541e9a0b9c3 | 7,298 | supabase-export-v2 | 94e6f5c4f08bddd9 | Return one of the following values:
* ``None`` if the file can't be opened because it's unreadable or doesn't exist
* the empty string (``''``) if the file's format can't be guessed
* a string containing the required module name, such as ``'dbm.ndbm'`` or ``'dbm.gnu'`` | trusted_official_docs | CPython Docs | Return one of the following values:
* ``None`` if the file can't be opened because it's unreadable or doesn't exist
* the empty string (``''``) if the file's format can't be guessed
* a string containing the required module name, such as ``'dbm.ndbm'`` or ``'dbm.gnu'`` | Return one of the following values:
* ``None`` if the file can't be opened because it's unreadable or doesn't exist
* the empty string (``''``) if the file's format can't be guessed
* a string containing the required module name, such as ``'dbm.ndbm'`` or ``'dbm.gnu'`` | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f4bd6544-9c67-4221-89aa-0df062eca2b7 | CPython Docs | file://datasets/cpython/Doc/library/dbm.rst | unknown | 4294c7e5-d3af-4119-a555-d541e9a0b9c3 | 7,309 | supabase-export-v2 | 63b74ba1b3b26eed | :param file: The database file to open.
If the database file already exists, the :func:`whichdb` function is used to
determine its type and the appropriate module is used; if it does not exist,
the first submodule listed above that can be imported is used. :type file: :term:`path-like object` | trusted_official_docs | CPython Docs | :param file: The database file to open.
If the database file already exists, the :func:`whichdb` function is used to
determine its type and the appropriate module is used; if it does not exist,
the first submodule listed above that can be imported is used. :type file: :term:`path-like object` | :param file: The database file to open.
If the database file already exists, the :func:`whichdb` function is used to
determine its type and the appropriate module is used; if it does not exist,
the first submodule listed above that can be imported is used. :type file: :term:`path-like object` | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f59d70da-bdf2-4faa-b591-190914950f1e | CPython Docs | file://datasets/cpython/Doc/library/dbm.rst | unknown | 4294c7e5-d3af-4119-a555-d541e9a0b9c3 | 7,292 | supabase-export-v2 | 2704be341dc221ec | these modules are installed, the slow-but-simple implementation in module :mod:`dbm.dumb` will be used. There is a `third party interface <https://www.jcea.es/programacion/pybsddb.htm>`_ to the Oracle Berkeley DB.
.. note::
None of the underlying modules will automatically shrink the disk space used by
the database f... | trusted_official_docs | CPython Docs | these modules are installed, the slow-but-simple implementation in module :mod:`dbm.dumb` will be used. There is a `third party interface <https://www.jcea.es/programacion/pybsddb.htm>`_ to the Oracle Berkeley DB.
.. note::
None of the underlying modules will automatically shrink the disk space used by
the database f... | these modules are installed, the slow-but-simple implementation in module :mod:`dbm.dumb` will be used. There is a `third party interface <https://www.jcea.es/programacion/pybsddb.htm>`_ to the Oracle Berkeley DB.
.. note::
None of the underlying modules will automatically shrink the disk space used by
the database f... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f71a9658-fed1-4d64-aabf-d4953e2f03ce | CPython Docs | file://datasets/cpython/Doc/library/dbm.rst | unknown | 4294c7e5-d3af-4119-a555-d541e9a0b9c3 | 7,305 | supabase-export-v2 | ea8318a79c8d41ea | .. |flag_n| replace:: Always create a new, empty database, open for reading and writing.
.. |mode_param_doc| replace::
The Unix file access mode of the file (default: octal ``0o666``),
used only when the database has to be created. | trusted_official_docs | CPython Docs | .. |flag_n| replace:: Always create a new, empty database, open for reading and writing.
.. |mode_param_doc| replace::
The Unix file access mode of the file (default: octal ``0o666``),
used only when the database has to be created. | .. |flag_n| replace:: Always create a new, empty database, open for reading and writing.
.. |mode_param_doc| replace::
The Unix file access mode of the file (default: octal ``0o666``),
used only when the database has to be created. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fa1ca1ce-f6c3-42ee-8c8a-22d3d42377d8 | CPython Docs | file://datasets/cpython/Doc/library/dbm.rst | unknown | 4294c7e5-d3af-4119-a555-d541e9a0b9c3 | 7,431 | supabase-export-v2 | 0a947e5d59439a17 | is possible to crash the Python interpreter when loading a database with a sufficiently large/complex entry due to stack depth limitations in Python's AST compiler.
.. warning::
:mod:`!dbm.dumb` does not support concurrent read/write access. (Multiple
simultaneous read accesses are safe.) When a program has the datab... | trusted_official_docs | CPython Docs | is possible to crash the Python interpreter when loading a database with a sufficiently large/complex entry due to stack depth limitations in Python's AST compiler.
.. warning::
:mod:`!dbm.dumb` does not support concurrent read/write access. (Multiple
simultaneous read accesses are safe.) When a program has the datab... | is possible to crash the Python interpreter when loading a database with a sufficiently large/complex entry due to stack depth limitations in Python's AST compiler.
.. warning::
:mod:`!dbm.dumb` does not support concurrent read/write access. (Multiple
simultaneous read accesses are safe.) When a program has the datab... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fbaf1371-f24c-41cb-9dee-af4aa2b373e5 | CPython Docs | file://datasets/cpython/Doc/library/dbm.rst | unknown | 4294c7e5-d3af-4119-a555-d541e9a0b9c3 | 7,439 | supabase-export-v2 | 9574e5c859daf4fe | .. method:: dumbdbm.reorganize()
If you have carried out a lot of deletions and would like to shrink the space
used on disk, this method will reorganize the database; otherwise, deleted file
space will not be reused. | trusted_official_docs | CPython Docs | .. method:: dumbdbm.reorganize()
If you have carried out a lot of deletions and would like to shrink the space
used on disk, this method will reorganize the database; otherwise, deleted file
space will not be reused. | .. method:: dumbdbm.reorganize()
If you have carried out a lot of deletions and would like to shrink the space
used on disk, this method will reorganize the database; otherwise, deleted file
space will not be reused. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
053f1e19-4072-4576-9fc5-f4cc5cd00619 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,832 | supabase-export-v2 | 11a95816d4715c58 | dynamically created attributes) and may find attributes that getattr can't (like descriptors that raise AttributeError). It can also return descriptors objects instead of instance members.
If the instance :attr:`~object.__dict__` is shadowed by another member (for
example a property) then this function will be unable ... | trusted_official_docs | CPython Docs | dynamically created attributes) and may find attributes that getattr can't (like descriptors that raise AttributeError). It can also return descriptors objects instead of instance members.
If the instance :attr:`~object.__dict__` is shadowed by another member (for
example a property) then this function will be unable ... | dynamically created attributes) and may find attributes that getattr can't (like descriptors that raise AttributeError). It can also return descriptors objects instead of instance members.
If the instance :attr:`~object.__dict__` is shadowed by another member (for
example a property) then this function will be unable ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
05725ad7-86af-4e4f-9dce-92c9a30d25b2 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,861 | supabase-export-v2 | 58d67de4e8d49080 | .. impl-detail::
This function relies on the generator exposing a Python stack frame
for introspection, which isn't guaranteed to be the case in all
implementations of Python. In such cases, this function will always
return an empty dictionary. | trusted_official_docs | CPython Docs | .. impl-detail::
This function relies on the generator exposing a Python stack frame
for introspection, which isn't guaranteed to be the case in all
implementations of Python. In such cases, this function will always
return an empty dictionary. | .. impl-detail::
This function relies on the generator exposing a Python stack frame
for introspection, which isn't guaranteed to be the case in all
implementations of Python. In such cases, this function will always
return an empty dictionary. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
086313d0-d6d0-4255-b019-ce56c7349753 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,893 | supabase-export-v2 | fec42af5b7c64fe3 | .. data:: CO_HAS_DOCSTRING
The flag is set when there is a docstring for the code object in
the source code. If set, it will be the first item in
:attr:`~codeobject.co_consts`. | trusted_official_docs | CPython Docs | .. data:: CO_HAS_DOCSTRING
The flag is set when there is a docstring for the code object in
the source code. If set, it will be the first item in
:attr:`~codeobject.co_consts`. | .. data:: CO_HAS_DOCSTRING
The flag is set when there is a docstring for the code object in
the source code. If set, it will be the first item in
:attr:`~codeobject.co_consts`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0be28564-c7ac-4c20-900b-bb5f1bd8c32a | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,646 | supabase-export-v2 | 691774b689f86aae | Create a string representation of the :class:`Signature` object.
If *max_width* is passed, the method will attempt to fit
the signature into lines of at most *max_width* characters. If the signature is longer than *max_width*,
all parameters will be on separate lines. | trusted_official_docs | CPython Docs | Create a string representation of the :class:`Signature` object.
If *max_width* is passed, the method will attempt to fit
the signature into lines of at most *max_width* characters. If the signature is longer than *max_width*,
all parameters will be on separate lines. | Create a string representation of the :class:`Signature` object.
If *max_width* is passed, the method will attempt to fit
the signature into lines of at most *max_width* characters. If the signature is longer than *max_width*,
all parameters will be on separate lines. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0c2742ac-7cf8-448c-ac8e-70a7fb899807 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,836 | supabase-export-v2 | a1afa904e8505356 | You can handle these with code like the following. Note that for arbitrary getset descriptors invoking these may trigger code execution::
# example code for resolving the builtin descriptor types
class _foo:
__slots__ = ['foo'] | trusted_official_docs | CPython Docs | You can handle these with code like the following. Note that for arbitrary getset descriptors invoking these may trigger code execution::
# example code for resolving the builtin descriptor types
class _foo:
__slots__ = ['foo'] | You can handle these with code like the following. Note that for arbitrary getset descriptors invoking these may trigger code execution::
# example code for resolving the builtin descriptor types
class _foo:
__slots__ = ['foo'] | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0d5b0651-1bf7-4bd5-a1e6-a8d44723ae8a | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,594 | supabase-export-v2 | ba1aab2caf96f3f1 | .. function:: getsource(object)
Return the text of the source code for an object. The argument may be a module,
class, method, function, traceback, frame, or code object. The source code is
returned as a single string. An :exc:`OSError` is raised if the source code
cannot be retrieved. A :exc:`TypeError` is raised i... | trusted_official_docs | CPython Docs | .. function:: getsource(object)
Return the text of the source code for an object. The argument may be a module,
class, method, function, traceback, frame, or code object. The source code is
returned as a single string. An :exc:`OSError` is raised if the source code
cannot be retrieved. A :exc:`TypeError` is raised i... | .. function:: getsource(object)
Return the text of the source code for an object. The argument may be a module,
class, method, function, traceback, frame, or code object. The source code is
returned as a single string. An :exc:`OSError` is raised if the source code
cannot be retrieved. A :exc:`TypeError` is raised i... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
10739fe5-e2f3-45bd-8cec-62ede4e0389d | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,742 | supabase-export-v2 | 95f28f5b3015645d | .. function:: getmro(cls)
Return a tuple of class cls's base classes, including cls, in method resolution
order. No class appears more than once in this tuple. Note that the method
resolution order depends on cls's type. Unless a very peculiar user-defined
metatype is in use, cls will be the first element of the tup... | trusted_official_docs | CPython Docs | .. function:: getmro(cls)
Return a tuple of class cls's base classes, including cls, in method resolution
order. No class appears more than once in this tuple. Note that the method
resolution order depends on cls's type. Unless a very peculiar user-defined
metatype is in use, cls will be the first element of the tup... | .. function:: getmro(cls)
Return a tuple of class cls's base classes, including cls, in method resolution
order. No class appears more than once in this tuple. Note that the method
resolution order depends on cls's type. Unless a very peculiar user-defined
metatype is in use, cls will be the first element of the tup... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1146bb02-86bd-48bc-ae5e-7b91e4632739 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,828 | supabase-export-v2 | 75192041e3d2e63c | trigger code execution when fetching or checking for the existence of attributes. Descriptors, like properties, will be invoked and :meth:`~object.__getattr__` and :meth:`~object.__getattribute__` may be called.
For cases where you want passive introspection, like documentation tools, this
can be inconvenient. :func:`g... | trusted_official_docs | CPython Docs | trigger code execution when fetching or checking for the existence of attributes. Descriptors, like properties, will be invoked and :meth:`~object.__getattr__` and :meth:`~object.__getattribute__` may be called.
For cases where you want passive introspection, like documentation tools, this
can be inconvenient. :func:`g... | trigger code execution when fetching or checking for the existence of attributes. Descriptors, like properties, will be invoked and :meth:`~object.__getattr__` and :meth:`~object.__getattribute__` may be called.
For cases where you want passive introspection, like documentation tools, this
can be inconvenient. :func:`g... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1296a034-b134-47cd-8b15-10f18bc98932 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,891 | supabase-export-v2 | cee1b36c077e73c4 | .. data:: CO_ASYNC_GENERATOR
The flag is set when the code object is an asynchronous generator
function. When the code object is executed it returns an
asynchronous generator object. See :pep:`525` for more details. | trusted_official_docs | CPython Docs | .. data:: CO_ASYNC_GENERATOR
The flag is set when the code object is an asynchronous generator
function. When the code object is executed it returns an
asynchronous generator object. See :pep:`525` for more details. | .. data:: CO_ASYNC_GENERATOR
The flag is set when the code object is an asynchronous generator
function. When the code object is executed it returns an
asynchronous generator object. See :pep:`525` for more details. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
159ec0e0-b11e-49c2-bc75-adc30c368f2e | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,647 | supabase-export-v2 | 633becfc19f4fc12 | to fit the signature into lines of at most *max_width* characters. If the signature is longer than *max_width*, all parameters will be on separate lines.
If *quote_annotation_strings* is False, :term:`annotations <annotation>`
in the signature are displayed without opening and closing quotation
marks if they are stri... | trusted_official_docs | CPython Docs | to fit the signature into lines of at most *max_width* characters. If the signature is longer than *max_width*, all parameters will be on separate lines.
If *quote_annotation_strings* is False, :term:`annotations <annotation>`
in the signature are displayed without opening and closing quotation
marks if they are stri... | to fit the signature into lines of at most *max_width* characters. If the signature is longer than *max_width*, all parameters will be on separate lines.
If *quote_annotation_strings* is False, :term:`annotations <annotation>`
in the signature are displayed without opening and closing quotation
marks if they are stri... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
17c4a5e8-c5b8-41c7-aef7-6774c9959386 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,578 | supabase-export-v2 | 8855f7e61bc0da41 | the documentation string from the inheritance hierarchy; * otherwise, if *fallback_to_class_doc* is true (by default), retrieve the documentation string from the class of the object.
Return ``None`` if the documentation string is invalid or missing. | trusted_official_docs | CPython Docs | the documentation string from the inheritance hierarchy; * otherwise, if *fallback_to_class_doc* is true (by default), retrieve the documentation string from the class of the object.
Return ``None`` if the documentation string is invalid or missing. | the documentation string from the inheritance hierarchy; * otherwise, if *fallback_to_class_doc* is true (by default), retrieve the documentation string from the class of the object.
Return ``None`` if the documentation string is invalid or missing. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1a2c4794-dd68-4ba2-b806-026f3fe7025d | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,801 | supabase-export-v2 | 0d0934685fea09cf | def handle_stackframe_without_leak(): frame = inspect.currentframe() try: # do something with the frame finally: del frame
If you want to keep the frame around (for example to print a traceback
later), you can also break reference cycles by using the
:meth:`frame.clear` method. | trusted_official_docs | CPython Docs | def handle_stackframe_without_leak(): frame = inspect.currentframe() try: # do something with the frame finally: del frame
If you want to keep the frame around (for example to print a traceback
later), you can also break reference cycles by using the
:meth:`frame.clear` method. | def handle_stackframe_without_leak(): frame = inspect.currentframe() try: # do something with the frame finally: del frame
If you want to keep the frame around (for example to print a traceback
later), you can also break reference cycles by using the
:meth:`frame.clear` method. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1b4edab5-15fd-4d99-8708-afbfc47d9059 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,824 | supabase-export-v2 | f0c137ab8c5398d8 | exception currently being handled was raised in. The first entry in the list represents the caller; the last entry represents where the exception was raised.
.. versionchanged:: 3.5
A list of :term:`named tuples <named tuple>`
``FrameInfo(frame, filename, lineno, function, code_context, index)``
is returned. | trusted_official_docs | CPython Docs | exception currently being handled was raised in. The first entry in the list represents the caller; the last entry represents where the exception was raised.
.. versionchanged:: 3.5
A list of :term:`named tuples <named tuple>`
``FrameInfo(frame, filename, lineno, function, code_context, index)``
is returned. | exception currently being handled was raised in. The first entry in the list represents the caller; the last entry represents where the exception was raised.
.. versionchanged:: 3.5
A list of :term:`named tuples <named tuple>`
``FrameInfo(frame, filename, lineno, function, code_context, index)``
is returned. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1c503496-ca9f-4150-9dd5-c28f69d1ad50 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,622 | supabase-export-v2 | 1a83913c430f2342 | it to create the signature. The exact semantics are an implementation detail and are subject to unannounced changes. Consult the source code for current semantics.
.. class:: Signature(parameters=None, *, return_annotation=Signature.empty) | trusted_official_docs | CPython Docs | it to create the signature. The exact semantics are an implementation detail and are subject to unannounced changes. Consult the source code for current semantics.
.. class:: Signature(parameters=None, *, return_annotation=Signature.empty) | it to create the signature. The exact semantics are an implementation detail and are subject to unannounced changes. Consult the source code for current semantics.
.. class:: Signature(parameters=None, *, return_annotation=Signature.empty) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1cdad6a5-e846-4184-b3e9-0afcb3e6fddb | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,782 | supabase-export-v2 | dae49e95289458fe | line number, end line number, start column offset, and end column offset associated with the instruction being executed by the frame this record corresponds to.
.. versionchanged:: 3.5
Return a :term:`named tuple` instead of a :class:`tuple`. | trusted_official_docs | CPython Docs | line number, end line number, start column offset, and end column offset associated with the instruction being executed by the frame this record corresponds to.
.. versionchanged:: 3.5
Return a :term:`named tuple` instead of a :class:`tuple`. | line number, end line number, start column offset, and end column offset associated with the instruction being executed by the frame this record corresponds to.
.. versionchanged:: 3.5
Return a :term:`named tuple` instead of a :class:`tuple`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1dc62b46-d989-4f72-8317-5ac0faccdcda | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,481 | supabase-export-v2 | c39ab9c569e34a6b | .. function:: getmembers(object[, predicate])
Return all the members of an object in a list of ``(name, value)``
pairs sorted by name. If the optional *predicate* argument—which will be
called with the ``value`` object of each member—is supplied, only members
for which the predicate returns a true value are included... | trusted_official_docs | CPython Docs | .. function:: getmembers(object[, predicate])
Return all the members of an object in a list of ``(name, value)``
pairs sorted by name. If the optional *predicate* argument—which will be
called with the ``value`` object of each member—is supplied, only members
for which the predicate returns a true value are included... | .. function:: getmembers(object[, predicate])
Return all the members of an object in a list of ``(name, value)``
pairs sorted by name. If the optional *predicate* argument—which will be
called with the ``value`` object of each member—is supplied, only members
for which the predicate returns a true value are included... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
26e8adc1-cc33-4772-a699-14dc867de6f3 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,583 | supabase-export-v2 | bdd365b402814ed3 | .. function:: getcomments(object)
Return in a single string any lines of comments immediately preceding the
object's source code (for a class, function, or method), or at the top of the
Python source file (if the object is a module). If the object's source code
is unavailable, return ``None``. This could happen if t... | trusted_official_docs | CPython Docs | .. function:: getcomments(object)
Return in a single string any lines of comments immediately preceding the
object's source code (for a class, function, or method), or at the top of the
Python source file (if the object is a module). If the object's source code
is unavailable, return ``None``. This could happen if t... | .. function:: getcomments(object)
Return in a single string any lines of comments immediately preceding the
object's source code (for a class, function, or method), or at the top of the
Python source file (if the object is a module). If the object's source code
is unavailable, return ``None``. This could happen if t... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
273814dc-0cf6-4e9f-8471-313bf251b68b | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,625 | supabase-export-v2 | 06813d3a3d006db9 | duplicate names, and that the parameters are in the right order, i.e. positional-only first, then positional-or-keyword, and that parameters with defaults follow parameters without defaults.
The optional *return_annotation* argument can be an arbitrary Python object. It represents the "return" annotation of the callabl... | trusted_official_docs | CPython Docs | duplicate names, and that the parameters are in the right order, i.e. positional-only first, then positional-or-keyword, and that parameters with defaults follow parameters without defaults.
The optional *return_annotation* argument can be an arbitrary Python object. It represents the "return" annotation of the callabl... | duplicate names, and that the parameters are in the right order, i.e. positional-only first, then positional-or-keyword, and that parameters with defaults follow parameters without defaults.
The optional *return_annotation* argument can be an arbitrary Python object. It represents the "return" annotation of the callabl... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
278f1bc0-d0bf-4b3a-a269-0db66db5c449 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,750 | supabase-export-v2 | 941571073e4a8930 | .. function:: getclosurevars(func)
Get the mapping of external name references in a Python function or
method *func* to their current values. A
:term:`named tuple` ``ClosureVars(nonlocals, globals, builtins, unbound)``
is returned. *nonlocals* maps referenced names to lexical closure
variables, *globals* to the fun... | trusted_official_docs | CPython Docs | .. function:: getclosurevars(func)
Get the mapping of external name references in a Python function or
method *func* to their current values. A
:term:`named tuple` ``ClosureVars(nonlocals, globals, builtins, unbound)``
is returned. *nonlocals* maps referenced names to lexical closure
variables, *globals* to the fun... | .. function:: getclosurevars(func)
Get the mapping of external name references in a Python function or
method *func* to their current values. A
:term:`named tuple` ``ClosureVars(nonlocals, globals, builtins, unbound)``
is returned. *nonlocals* maps referenced names to lexical closure
variables, *globals* to the fun... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2cd31618-80e3-4736-a63d-5027bbc48e71 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,623 | supabase-export-v2 | adf215dc33b2da9c | .. class:: Signature(parameters=None, *, return_annotation=Signature.empty)
A :class:`!Signature` object represents the call signature of a function
and its return
annotation. For each parameter accepted by the function it stores a
:class:`Parameter` object in its :attr:`parameters` collection. | trusted_official_docs | CPython Docs | .. class:: Signature(parameters=None, *, return_annotation=Signature.empty)
A :class:`!Signature` object represents the call signature of a function
and its return
annotation. For each parameter accepted by the function it stores a
:class:`Parameter` object in its :attr:`parameters` collection. | .. class:: Signature(parameters=None, *, return_annotation=Signature.empty)
A :class:`!Signature` object represents the call signature of a function
and its return
annotation. For each parameter accepted by the function it stores a
:class:`Parameter` object in its :attr:`parameters` collection. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3260d1e6-c362-4a19-a18a-88cb87f092b4 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,614 | supabase-export-v2 | 3c67cf5a27790fed | the annotations are stringized, and *eval_str* is not false, the ``eval()`` call(s) to un-stringize the annotations in :func:`annotationlib.get_annotations` could potentially raise any kind of exception.
A slash (/) in the signature of a function denotes that the parameters prior
to it are positional-only. For more in... | trusted_official_docs | CPython Docs | the annotations are stringized, and *eval_str* is not false, the ``eval()`` call(s) to un-stringize the annotations in :func:`annotationlib.get_annotations` could potentially raise any kind of exception.
A slash (/) in the signature of a function denotes that the parameters prior
to it are positional-only. For more in... | the annotations are stringized, and *eval_str* is not false, the ``eval()`` call(s) to un-stringize the annotations in :func:`annotationlib.get_annotations` could potentially raise any kind of exception.
A slash (/) in the signature of a function denotes that the parameters prior
to it are positional-only. For more in... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3272d65b-d9d3-456e-bf1f-9e51472d0a5f | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,746 | supabase-export-v2 | 34f4da2f84d0688f | .. doctest::
>>> from inspect import getcallargs
>>> def f(a, b=1, *pos, **named):
... pass
... >>> getcallargs(f, 1, 2, 3) == {'a': 1, 'named': {}, 'b': 2, 'pos': (3,)}
True
>>> getcallargs(f, a=2, x=4) == {'a': 2, 'named': {'x': 4}, 'b': 1, 'pos': ()}
True
>>> getcallargs(f)
Traceback (most recent call last):... | trusted_official_docs | CPython Docs | .. doctest::
>>> from inspect import getcallargs
>>> def f(a, b=1, *pos, **named):
... pass
... >>> getcallargs(f, 1, 2, 3) == {'a': 1, 'named': {}, 'b': 2, 'pos': (3,)}
True
>>> getcallargs(f, a=2, x=4) == {'a': 2, 'named': {'x': 4}, 'b': 1, 'pos': ()}
True
>>> getcallargs(f)
Traceback (most recent call last):... | .. doctest::
>>> from inspect import getcallargs
>>> def f(a, b=1, *pos, **named):
... pass
... >>> getcallargs(f, 1, 2, 3) == {'a': 1, 'named': {}, 'b': 2, 'pos': (3,)}
True
>>> getcallargs(f, a=2, x=4) == {'a': 2, 'named': {'x': 4}, 'b': 1, 'pos': ()}
True
>>> getcallargs(f)
Traceback (most recent call last):... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
34b7e201-1d73-4f8a-b4ed-7411fac60a88 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,726 | supabase-export-v2 | 43527e979f8d9735 | .. function:: getclasstree(classes, unique=False)
Arrange the given list of classes into a hierarchy of nested lists. Where a
nested list appears, it contains classes derived from the class whose entry
immediately precedes the list. Each entry is a 2-tuple containing a class and a
tuple of its base classes. If the *... | trusted_official_docs | CPython Docs | .. function:: getclasstree(classes, unique=False)
Arrange the given list of classes into a hierarchy of nested lists. Where a
nested list appears, it contains classes derived from the class whose entry
immediately precedes the list. Each entry is a 2-tuple containing a class and a
tuple of its base classes. If the *... | .. function:: getclasstree(classes, unique=False)
Arrange the given list of classes into a hierarchy of nested lists. Where a
nested list appears, it contains classes derived from the class whose entry
immediately precedes the list. Each entry is a 2-tuple containing a class and a
tuple of its base classes. If the *... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
34c9f527-e5c3-4b10-b94a-61ce1909ba88 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,767 | supabase-export-v2 | 4af0c43b698e5cb3 | The interpreter stack ---------------------
Some of the following functions return
:class:`FrameInfo` objects. For backwards compatibility these objects allow
tuple-like operations on all attributes except ``positions``. This behavior
is considered deprecated and may be removed in the future. | trusted_official_docs | CPython Docs | The interpreter stack ---------------------
Some of the following functions return
:class:`FrameInfo` objects. For backwards compatibility these objects allow
tuple-like operations on all attributes except ``positions``. This behavior
is considered deprecated and may be removed in the future. | The interpreter stack ---------------------
Some of the following functions return
:class:`FrameInfo` objects. For backwards compatibility these objects allow
tuple-like operations on all attributes except ``positions``. This behavior
is considered deprecated and may be removed in the future. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
358edb3b-c3ca-46ce-927f-45c585017aa3 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,734 | supabase-export-v2 | 9d1e3fc9a478d726 | decision has been reversed in order to restore a clearly supported standard interface for single-source Python 2/3 code migrating away from the legacy :func:`!getargspec` API.
.. versionchanged:: 3.7
Python only explicitly guaranteed that it preserved the declaration
order of keyword-only parameters as of version 3.7... | trusted_official_docs | CPython Docs | decision has been reversed in order to restore a clearly supported standard interface for single-source Python 2/3 code migrating away from the legacy :func:`!getargspec` API.
.. versionchanged:: 3.7
Python only explicitly guaranteed that it preserved the declaration
order of keyword-only parameters as of version 3.7... | decision has been reversed in order to restore a clearly supported standard interface for single-source Python 2/3 code migrating away from the legacy :func:`!getargspec` API.
.. versionchanged:: 3.7
Python only explicitly guaranteed that it preserved the declaration
order of keyword-only parameters as of version 3.7... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
36990a73-e21e-4dae-a0ea-d6f5e5de7840 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,888 | supabase-export-v2 | 724aaaea4572f23a | .. data:: CO_ITERABLE_COROUTINE
The flag is used to transform generators into generator-based
coroutines. Generator objects with this flag can be used in
``await`` expression, and can ``yield from`` coroutine objects. See :pep:`492` for more details. | trusted_official_docs | CPython Docs | .. data:: CO_ITERABLE_COROUTINE
The flag is used to transform generators into generator-based
coroutines. Generator objects with this flag can be used in
``await`` expression, and can ``yield from`` coroutine objects. See :pep:`492` for more details. | .. data:: CO_ITERABLE_COROUTINE
The flag is used to transform generators into generator-based
coroutines. Generator objects with this flag can be used in
``await`` expression, and can ``yield from`` coroutine objects. See :pep:`492` for more details. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
38406b51-dc2f-48d6-8cea-40c3eaa39979 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,456 | supabase-export-v2 | a15b83670347da81 | | | | names to annotations; | | | | ``"return"`` key is | | | | reserved for return | | | | annotations.
|
+-----------------+-------------------+---------------------------+
| | __type_params__ | A tuple containing the |
| | | :ref:`type parameters |
| | | <type-params>` of |
| | | a generic function |
+--------------... | trusted_official_docs | CPython Docs | | | | names to annotations; | | | | ``"return"`` key is | | | | reserved for return | | | | annotations.
|
+-----------------+-------------------+---------------------------+
| | __type_params__ | A tuple containing the |
| | | :ref:`type parameters |
| | | <type-params>` of |
| | | a generic function |
+--------------... | | | | names to annotations; | | | | ``"return"`` key is | | | | reserved for return | | | | annotations.
|
+-----------------+-------------------+---------------------------+
| | __type_params__ | A tuple containing the |
| | | :ref:`type parameters |
| | | <type-params>` of |
| | | a generic function |
+--------------... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
38c32384-7380-4e7f-8a5c-9f729121daec | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,731 | supabase-export-v2 | 3d807b5f74ef10d7 | supplied. *annotations* is a dictionary mapping parameter names to annotations. The special key ``"return"`` is used to report the function return value annotation (if any).
Note that :func:`signature` and
:ref:`Signature Object <inspect-signature-object>` provide the recommended
API for callable introspection, and s... | trusted_official_docs | CPython Docs | supplied. *annotations* is a dictionary mapping parameter names to annotations. The special key ``"return"`` is used to report the function return value annotation (if any).
Note that :func:`signature` and
:ref:`Signature Object <inspect-signature-object>` provide the recommended
API for callable introspection, and s... | supplied. *annotations* is a dictionary mapping parameter names to annotations. The special key ``"return"`` is used to report the function return value annotation (if any).
Note that :func:`signature` and
:ref:`Signature Object <inspect-signature-object>` provide the recommended
API for callable introspection, and s... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3adf7481-6758-4e54-ae97-95abbc9db50a | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,643 | supabase-export-v2 | f160a336e4964cb3 | >>> def test(a, b): ... pass ... >>> sig = signature(test) >>> new_sig = sig.replace(return_annotation="new return anno") >>> str(new_sig) "(a, b) -> 'new return anno'"
:class:`Signature` objects are also supported by the generic function
:func:`copy.replace`. | trusted_official_docs | CPython Docs | >>> def test(a, b): ... pass ... >>> sig = signature(test) >>> new_sig = sig.replace(return_annotation="new return anno") >>> str(new_sig) "(a, b) -> 'new return anno'"
:class:`Signature` objects are also supported by the generic function
:func:`copy.replace`. | >>> def test(a, b): ... pass ... >>> sig = signature(test) >>> new_sig = sig.replace(return_annotation="new return anno") >>> str(new_sig) "(a, b) -> 'new return anno'"
:class:`Signature` objects are also supported by the generic function
:func:`copy.replace`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3dcc51c0-2f8a-426b-8996-5580cbe14863 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,676 | supabase-export-v2 | 1980f8162ab4e55c | argument. Positional only parameters are | | | those which appear before a ``/`` entry (if | | | present) in a Python function definition.
|
+------------------------+----------------------------------------------+
| *POSITIONAL_OR_KEYWORD*| Value may be supplied as either a keyword or |
| | positional argument (thi... | trusted_official_docs | CPython Docs | argument. Positional only parameters are | | | those which appear before a ``/`` entry (if | | | present) in a Python function definition.
|
+------------------------+----------------------------------------------+
| *POSITIONAL_OR_KEYWORD*| Value may be supplied as either a keyword or |
| | positional argument (thi... | argument. Positional only parameters are | | | those which appear before a ``/`` entry (if | | | present) in a Python function definition.
|
+------------------------+----------------------------------------------+
| *POSITIONAL_OR_KEYWORD*| Value may be supplied as either a keyword or |
| | positional argument (thi... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3e80e67a-c6fb-4b98-97e3-9140ca89ece8 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,485 | supabase-export-v2 | e5e9fa9e949e8cd7 | .. function:: getmembers_static(object[, predicate])
Return all the members of an object in a list of ``(name, value)``
pairs sorted by name without triggering dynamic lookup via the descriptor
protocol, __getattr__ or __getattribute__. Optionally, only return members
that satisfy a given predicate. | trusted_official_docs | CPython Docs | .. function:: getmembers_static(object[, predicate])
Return all the members of an object in a list of ``(name, value)``
pairs sorted by name without triggering dynamic lookup via the descriptor
protocol, __getattr__ or __getattribute__. Optionally, only return members
that satisfy a given predicate. | .. function:: getmembers_static(object[, predicate])
Return all the members of an object in a list of ``(name, value)``
pairs sorted by name without triggering dynamic lookup via the descriptor
protocol, __getattr__ or __getattribute__. Optionally, only return members
that satisfy a given predicate. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
409f8065-5ff7-4c0d-a64f-46553fb05843 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,457 | supabase-export-v2 | b454b80a0a7fd9b4 | | +-----------------+-------------------+---------------------------+ | | __qualname__ | qualified name | +-----------------+-------------------+---------------------------+ | | gi_frame | frame | +-----------------+-------------------+---------------------------+ | | gi_running | is the generator running?
|
+---------... | trusted_official_docs | CPython Docs | | +-----------------+-------------------+---------------------------+ | | __qualname__ | qualified name | +-----------------+-------------------+---------------------------+ | | gi_frame | frame | +-----------------+-------------------+---------------------------+ | | gi_running | is the generator running?
|
+---------... | | +-----------------+-------------------+---------------------------+ | | __qualname__ | qualified name | +-----------------+-------------------+---------------------------+ | | gi_frame | frame | +-----------------+-------------------+---------------------------+ | | gi_running | is the generator running?
|
+---------... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
414f3f4d-2daf-4767-9fb3-43334df989cd | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,835 | supabase-export-v2 | d7f07b6a95dabaa2 | not resolve descriptors, for example slot descriptors or getset descriptors on objects implemented in C. The descriptor object is returned instead of the underlying attribute.
You can handle these with code like the following. Note that
for arbitrary getset descriptors invoking these may trigger
code execution:: | trusted_official_docs | CPython Docs | not resolve descriptors, for example slot descriptors or getset descriptors on objects implemented in C. The descriptor object is returned instead of the underlying attribute.
You can handle these with code like the following. Note that
for arbitrary getset descriptors invoking these may trigger
code execution:: | not resolve descriptors, for example slot descriptors or getset descriptors on objects implemented in C. The descriptor object is returned instead of the underlying attribute.
You can handle these with code like the following. Note that
for arbitrary getset descriptors invoking these may trigger
code execution:: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4163927d-05c0-4da6-a17f-26193f4b35fb | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,859 | supabase-export-v2 | e3dccc91298f33e0 | maps from variable names to values. This is the equivalent of calling :func:`locals` in the body of the generator, and all the same caveats apply.
If *generator* is a :term:`generator` with no currently associated frame,
then an empty dictionary is returned. :exc:`TypeError` is raised if
*generator* is not a Python g... | trusted_official_docs | CPython Docs | maps from variable names to values. This is the equivalent of calling :func:`locals` in the body of the generator, and all the same caveats apply.
If *generator* is a :term:`generator` with no currently associated frame,
then an empty dictionary is returned. :exc:`TypeError` is raised if
*generator* is not a Python g... | maps from variable names to values. This is the equivalent of calling :func:`locals` in the body of the generator, and all the same caveats apply.
If *generator* is a :term:`generator` with no currently associated frame,
then an empty dictionary is returned. :exc:`TypeError` is raised if
*generator* is not a Python g... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4286d1df-2280-4e52-9526-cfed5f8f19b7 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,798 | supabase-export-v2 | 427b8ae7a8433ad2 | .. note::
Keeping references to frame objects, as found in the first element of the frame
records these functions return, can cause your program to create reference
cycles. Once a reference cycle has been created, the lifespan of all objects
which can be accessed from the objects which form the cycle can become much... | trusted_official_docs | CPython Docs | .. note::
Keeping references to frame objects, as found in the first element of the frame
records these functions return, can cause your program to create reference
cycles. Once a reference cycle has been created, the lifespan of all objects
which can be accessed from the objects which form the cycle can become much... | .. note::
Keeping references to frame objects, as found in the first element of the frame
records these functions return, can cause your program to create reference
cycles. Once a reference cycle has been created, the lifespan of all objects
which can be accessed from the objects which form the cycle can become much... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
43baeba5-baa0-4c35-9689-f1698418a21e | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,490 | supabase-export-v2 | 536c6529ceeb747c | .. function:: getmodulename(path)
Return the name of the module named by the file *path*, without including the
names of enclosing packages. The file extension is checked against all of
the entries in :func:`importlib.machinery.all_suffixes`. If it matches,
the final path component is returned with the extension rem... | trusted_official_docs | CPython Docs | .. function:: getmodulename(path)
Return the name of the module named by the file *path*, without including the
names of enclosing packages. The file extension is checked against all of
the entries in :func:`importlib.machinery.all_suffixes`. If it matches,
the final path component is returned with the extension rem... | .. function:: getmodulename(path)
Return the name of the module named by the file *path*, without including the
names of enclosing packages. The file extension is checked against all of
the entries in :func:`importlib.machinery.all_suffixes`. If it matches,
the final path component is returned with the extension rem... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
461daec9-a72c-4d65-a5d2-4b3b01cb8552 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,591 | supabase-export-v2 | f01e7b515256007f | .. function:: getsourcelines(object)
Return a list of source lines and starting line number for an object. The
argument may be a module, class, method, function, traceback, frame, or code
object. The source code is returned as a list of the lines corresponding to the
object and the line number indicates where in the... | trusted_official_docs | CPython Docs | .. function:: getsourcelines(object)
Return a list of source lines and starting line number for an object. The
argument may be a module, class, method, function, traceback, frame, or code
object. The source code is returned as a list of the lines corresponding to the
object and the line number indicates where in the... | .. function:: getsourcelines(object)
Return a list of source lines and starting line number for an object. The
argument may be a module, class, method, function, traceback, frame, or code
object. The source code is returned as a list of the lines corresponding to the
object and the line number indicates where in the... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
473e1402-9edd-47d1-9b7e-767f19c2b704 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,847 | supabase-export-v2 | cd3ba14f6ed16a77 | .. function:: getcoroutinestate(coroutine)
Get current state of a coroutine object. The function is intended to be
used with coroutine objects created by :keyword:`async def` functions, but
will accept any coroutine-like object that has ``cr_running`` and
``cr_frame`` attributes. | trusted_official_docs | CPython Docs | .. function:: getcoroutinestate(coroutine)
Get current state of a coroutine object. The function is intended to be
used with coroutine objects created by :keyword:`async def` functions, but
will accept any coroutine-like object that has ``cr_running`` and
``cr_frame`` attributes. | .. function:: getcoroutinestate(coroutine)
Get current state of a coroutine object. The function is intended to be
used with coroutine objects created by :keyword:`async def` functions, but
will accept any coroutine-like object that has ``cr_running`` and
``cr_frame`` attributes. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
486bff7d-493b-4edb-83a8-b8ef8d4925fd | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,667 | supabase-export-v2 | 21d360b0249cd95a | CPython generates implicit parameter names of the form ``.0`` on the code objects used to implement comprehensions and generator expressions.
.. versionchanged:: 3.6
These parameter names are now exposed by this module as names like
``implicit0``. | trusted_official_docs | CPython Docs | CPython generates implicit parameter names of the form ``.0`` on the code objects used to implement comprehensions and generator expressions.
.. versionchanged:: 3.6
These parameter names are now exposed by this module as names like
``implicit0``. | CPython generates implicit parameter names of the form ``.0`` on the code objects used to implement comprehensions and generator expressions.
.. versionchanged:: 3.6
These parameter names are now exposed by this module as names like
``implicit0``. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4b2d84ad-ce61-41e2-a837-78a68701f618 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,802 | supabase-export-v2 | 9c3c5151f15edeb9 | you want to keep the frame around (for example to print a traceback later), you can also break reference cycles by using the :meth:`frame.clear` method.
The optional *context* argument supported by most of these functions specifies
the number of lines of context to return, which are centered around the current
line. | trusted_official_docs | CPython Docs | you want to keep the frame around (for example to print a traceback later), you can also break reference cycles by using the :meth:`frame.clear` method.
The optional *context* argument supported by most of these functions specifies
the number of lines of context to return, which are centered around the current
line. | you want to keep the frame around (for example to print a traceback later), you can also break reference cycles by using the :meth:`frame.clear` method.
The optional *context* argument supported by most of these functions specifies
the number of lines of context to return, which are centered around the current
line. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4ead37f1-b078-4083-ac4d-2040bcbf9136 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,640 | supabase-export-v2 | 29032221e3727818 | .. method:: Signature.replace(*[, parameters][, return_annotation])
Create a new :class:`Signature` instance based on the instance
:meth:`replace` was invoked on. It is possible to pass different *parameters* and/or
*return_annotation* to override the corresponding properties of the base
signature. To remove ``retur... | trusted_official_docs | CPython Docs | .. method:: Signature.replace(*[, parameters][, return_annotation])
Create a new :class:`Signature` instance based on the instance
:meth:`replace` was invoked on. It is possible to pass different *parameters* and/or
*return_annotation* to override the corresponding properties of the base
signature. To remove ``retur... | .. method:: Signature.replace(*[, parameters][, return_annotation])
Create a new :class:`Signature` instance based on the instance
:meth:`replace` was invoked on. It is possible to pass different *parameters* and/or
*return_annotation* to override the corresponding properties of the base
signature. To remove ``retur... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4f0d7794-35ff-47a9-a3b1-ef82d0bab59b | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,819 | supabase-export-v2 | 98bc3c330113b8fd | .. function:: stack(context=1)
Return a list of :class:`FrameInfo` objects for the caller's stack. The
first entry in the returned list represents the caller; the last entry
represents the outermost call on the stack. | trusted_official_docs | CPython Docs | .. function:: stack(context=1)
Return a list of :class:`FrameInfo` objects for the caller's stack. The
first entry in the returned list represents the caller; the last entry
represents the outermost call on the stack. | .. function:: stack(context=1)
Return a list of :class:`FrameInfo` objects for the caller's stack. The
first entry in the returned list represents the caller; the last entry
represents the outermost call on the stack. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
50e94090-b250-4e63-b129-07d02c94dd34 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,592 | supabase-export-v2 | bcd4e92231abfc0a | An :exc:`OSError` is raised if the source code cannot be retrieved. A :exc:`TypeError` is raised if the object is a built-in module, class, or function.
.. versionchanged:: 3.3
:exc:`OSError` is raised instead of :exc:`IOError`, now an alias of the
former. | trusted_official_docs | CPython Docs | An :exc:`OSError` is raised if the source code cannot be retrieved. A :exc:`TypeError` is raised if the object is a built-in module, class, or function.
.. versionchanged:: 3.3
:exc:`OSError` is raised instead of :exc:`IOError`, now an alias of the
former. | An :exc:`OSError` is raised if the source code cannot be retrieved. A :exc:`TypeError` is raised if the object is a built-in module, class, or function.
.. versionchanged:: 3.3
:exc:`OSError` is raised instead of :exc:`IOError`, now an alias of the
former. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
51a9f4f4-fdca-4957-9597-5f89c04e1db8 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,739 | supabase-export-v2 | 644790643617655f | .. function:: formatargvalues(args[, varargs, varkw, locals, formatarg, formatvarargs, formatvarkw, formatvalue])
Format a pretty argument spec from the four values returned by
:func:`getargvalues`. The format\* arguments are the corresponding optional
formatting functions that are called to turn names and values int... | trusted_official_docs | CPython Docs | .. function:: formatargvalues(args[, varargs, varkw, locals, formatarg, formatvarargs, formatvarkw, formatvalue])
Format a pretty argument spec from the four values returned by
:func:`getargvalues`. The format\* arguments are the corresponding optional
formatting functions that are called to turn names and values int... | .. function:: formatargvalues(args[, varargs, varkw, locals, formatarg, formatvarargs, formatvarkw, formatvalue])
Format a pretty argument spec from the four values returned by
:func:`getargvalues`. The format\* arguments are the corresponding optional
formatting functions that are called to turn names and values int... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
51d28bb4-ae3c-42f6-ac95-e07cd9880ec5 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,831 | supabase-export-v2 | c076e8a0761221b9 | Retrieve attributes without triggering dynamic lookup via the descriptor protocol, :meth:`~object.__getattr__` or :meth:`~object.__getattribute__`.
Note: this function may not be able to retrieve all attributes
that getattr can fetch (like dynamically created attributes)
and may find attributes that getattr can't (li... | trusted_official_docs | CPython Docs | Retrieve attributes without triggering dynamic lookup via the descriptor protocol, :meth:`~object.__getattr__` or :meth:`~object.__getattribute__`.
Note: this function may not be able to retrieve all attributes
that getattr can fetch (like dynamically created attributes)
and may find attributes that getattr can't (li... | Retrieve attributes without triggering dynamic lookup via the descriptor protocol, :meth:`~object.__getattr__` or :meth:`~object.__getattribute__`.
Note: this function may not be able to retrieve all attributes
that getattr can fetch (like dynamically created attributes)
and may find attributes that getattr can't (li... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
563abb12-a532-4c95-aea6-8313f17438d0 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,615 | supabase-export-v2 | 9aeaa2330b09b6aa | the signature of a function denotes that the parameters prior to it are positional-only. For more info, see :ref:`the FAQ entry on positional-only parameters <faq-positional-only-arguments>`.
.. versionchanged:: 3.5
The *follow_wrapped* parameter was added. Pass ``False`` to get a signature of
*callable* specifically... | trusted_official_docs | CPython Docs | the signature of a function denotes that the parameters prior to it are positional-only. For more info, see :ref:`the FAQ entry on positional-only parameters <faq-positional-only-arguments>`.
.. versionchanged:: 3.5
The *follow_wrapped* parameter was added. Pass ``False`` to get a signature of
*callable* specifically... | the signature of a function denotes that the parameters prior to it are positional-only. For more info, see :ref:`the FAQ entry on positional-only parameters <faq-positional-only-arguments>`.
.. versionchanged:: 3.5
The *follow_wrapped* parameter was added. Pass ``False`` to get a signature of
*callable* specifically... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
57f1379e-e46a-4f92-aa2e-7bcf6bd8f643 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,751 | supabase-export-v2 | 068bb31060f7ee4d | body. *unbound* is the set of names referenced in the function that could not be resolved at all given the current module globals and builtins.
:exc:`TypeError` is raised if *func* is not a Python function or method. | trusted_official_docs | CPython Docs | body. *unbound* is the set of names referenced in the function that could not be resolved at all given the current module globals and builtins.
:exc:`TypeError` is raised if *func* is not a Python function or method. | body. *unbound* is the set of names referenced in the function that could not be resolved at all given the current module globals and builtins.
:exc:`TypeError` is raised if *func* is not a Python function or method. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5823e363-9b2c-4ab0-8998-1c7c5d87b8e3 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,465 | supabase-export-v2 | c862e8f3dd43995d | Add ``__qualname__`` and ``gi_yieldfrom`` attributes to generators.
The ``__name__`` attribute of generators is now set from the function
name, instead of the code name, and it can now be modified. | trusted_official_docs | CPython Docs | Add ``__qualname__`` and ``gi_yieldfrom`` attributes to generators.
The ``__name__`` attribute of generators is now set from the function
name, instead of the code name, and it can now be modified. | Add ``__qualname__`` and ``gi_yieldfrom`` attributes to generators.
The ``__name__`` attribute of generators is now set from the function
name, instead of the code name, and it can now be modified. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
58adf7d2-f760-4caa-8913-ea1c8ac681fb | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,632 | supabase-export-v2 | 8c97a8a4d131cc6e | An ordered mapping of parameters' names to the corresponding :class:`Parameter` objects. Parameters appear in strict definition order, including keyword-only parameters.
.. versionchanged:: 3.7
Python only explicitly guaranteed that it preserved the declaration
order of keyword-only parameters as of version 3.7, alth... | trusted_official_docs | CPython Docs | An ordered mapping of parameters' names to the corresponding :class:`Parameter` objects. Parameters appear in strict definition order, including keyword-only parameters.
.. versionchanged:: 3.7
Python only explicitly guaranteed that it preserved the declaration
order of keyword-only parameters as of version 3.7, alth... | An ordered mapping of parameters' names to the corresponding :class:`Parameter` objects. Parameters appear in strict definition order, including keyword-only parameters.
.. versionchanged:: 3.7
Python only explicitly guaranteed that it preserved the declaration
order of keyword-only parameters as of version 3.7, alth... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5c18fce2-2de7-4dd8-b7e1-a6561bc3e3b2 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,834 | supabase-export-v2 | 3ecb2ac0dc26dbb6 | .. versionadded:: 3.2
:func:`getattr_static` does not resolve descriptors, for example slot descriptors or
getset descriptors on objects implemented in C. The descriptor object
is returned instead of the underlying attribute. | trusted_official_docs | CPython Docs | .. versionadded:: 3.2
:func:`getattr_static` does not resolve descriptors, for example slot descriptors or
getset descriptors on objects implemented in C. The descriptor object
is returned instead of the underlying attribute. | .. versionadded:: 3.2
:func:`getattr_static` does not resolve descriptors, for example slot descriptors or
getset descriptors on objects implemented in C. The descriptor object
is returned instead of the underlying attribute. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5c71bcf2-a639-4d84-bfb7-a76a0b2221cb | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,458 | supabase-export-v2 | 5f0b5e1cf8d588f0 | | +-----------------+-------------------+---------------------------+ | | gi_suspended | is the generator | | | | suspended?
|
+-----------------+-------------------+---------------------------+
| | gi_code | code |
+-----------------+-------------------+---------------------------+
| | gi_yieldfrom | object being iter... | trusted_official_docs | CPython Docs | | +-----------------+-------------------+---------------------------+ | | gi_suspended | is the generator | | | | suspended?
|
+-----------------+-------------------+---------------------------+
| | gi_code | code |
+-----------------+-------------------+---------------------------+
| | gi_yieldfrom | object being iter... | | +-----------------+-------------------+---------------------------+ | | gi_suspended | is the generator | | | | suspended?
|
+-----------------+-------------------+---------------------------+
| | gi_code | code |
+-----------------+-------------------+---------------------------+
| | gi_yieldfrom | object being iter... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5ccc199c-63ac-4ee7-ba50-65bba7af1ff0 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,589 | supabase-export-v2 | 5d56a415a4e95055 | .. function:: getsourcefile(object)
Return the name of the Python source file in which an object was defined
or ``None`` if no way can be identified to get the source. This
will fail with a :exc:`TypeError` if the object is a built-in module, class, or
function. | trusted_official_docs | CPython Docs | .. function:: getsourcefile(object)
Return the name of the Python source file in which an object was defined
or ``None`` if no way can be identified to get the source. This
will fail with a :exc:`TypeError` if the object is a built-in module, class, or
function. | .. function:: getsourcefile(object)
Return the name of the Python source file in which an object was defined
or ``None`` if no way can be identified to get the source. This
will fail with a :exc:`TypeError` if the object is a built-in module, class, or
function. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5e6d8eab-8b4c-4ff9-b84e-f2fdcdc216b5 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,459 | supabase-export-v2 | 7d490b16b12253ba | awaited on, | | | | or ``None`` | +-----------------+-------------------+---------------------------+ | | ag_frame | frame | +-----------------+-------------------+---------------------------+ | | ag_running | is the generator running?
|
+-----------------+-------------------+---------------------------+
| | ag_suspend... | trusted_official_docs | CPython Docs | awaited on, | | | | or ``None`` | +-----------------+-------------------+---------------------------+ | | ag_frame | frame | +-----------------+-------------------+---------------------------+ | | ag_running | is the generator running?
|
+-----------------+-------------------+---------------------------+
| | ag_suspend... | awaited on, | | | | or ``None`` | +-----------------+-------------------+---------------------------+ | | ag_frame | frame | +-----------------+-------------------+---------------------------+ | | ag_running | is the generator running?
|
+-----------------+-------------------+---------------------------+
| | ag_suspend... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5f363e0c-11a2-4d49-8eaf-053c1cb93833 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,678 | supabase-export-v2 | 3bd489aff6dc734f | bound| | | to any other parameter. This corresponds to a| | | ``**kwargs`` parameter in a Python function | | | definition. | +------------------------+----------------------------------------------+
Example: print all keyword-only arguments without default values: | trusted_official_docs | CPython Docs | bound| | | to any other parameter. This corresponds to a| | | ``**kwargs`` parameter in a Python function | | | definition. | +------------------------+----------------------------------------------+
Example: print all keyword-only arguments without default values: | bound| | | to any other parameter. This corresponds to a| | | ``**kwargs`` parameter in a Python function | | | definition. | +------------------------+----------------------------------------------+
Example: print all keyword-only arguments without default values: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5f46f065-17f4-4c48-82fb-be372e376027 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,795 | supabase-export-v2 | f6b51930b8f5c10b | .. attribute:: positions
A :class:`dis.Positions` object containing the start line number, end
line number, start column offset, and end column offset associated with
the instruction being executed by the frame this traceback corresponds
to. | trusted_official_docs | CPython Docs | .. attribute:: positions
A :class:`dis.Positions` object containing the start line number, end
line number, start column offset, and end column offset associated with
the instruction being executed by the frame this traceback corresponds
to. | .. attribute:: positions
A :class:`dis.Positions` object containing the start line number, end
line number, start column offset, and end column offset associated with
the instruction being executed by the frame this traceback corresponds
to. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5f6632bf-ec66-42fa-9d6e-1e61209bce85 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,487 | supabase-export-v2 | c8f776c8a913105a | .. note::
:func:`getmembers_static` may not be able to retrieve all members
that getmembers can fetch (like dynamically created attributes)
and may find members that getmembers can't (like descriptors
that raise AttributeError). It can also return descriptor objects
instead of instance members in some cases. | trusted_official_docs | CPython Docs | .. note::
:func:`getmembers_static` may not be able to retrieve all members
that getmembers can fetch (like dynamically created attributes)
and may find members that getmembers can't (like descriptors
that raise AttributeError). It can also return descriptor objects
instead of instance members in some cases. | .. note::
:func:`getmembers_static` may not be able to retrieve all members
that getmembers can fetch (like dynamically created attributes)
and may find members that getmembers can't (like descriptors
that raise AttributeError). It can also return descriptor objects
instead of instance members in some cases. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
64f25cea-0e8d-4fbe-8089-668d3fe38594 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,690 | supabase-export-v2 | c6198a3ab616e307 | .. method:: Parameter.replace(*[, name][, kind][, default][, annotation])
Create a new :class:`Parameter` instance based on the instance replaced was invoked
on. To override a :class:`!Parameter` attribute, pass the corresponding
argument. To remove a default value or/and an annotation from a
:class:`!Parameter`, pa... | trusted_official_docs | CPython Docs | .. method:: Parameter.replace(*[, name][, kind][, default][, annotation])
Create a new :class:`Parameter` instance based on the instance replaced was invoked
on. To override a :class:`!Parameter` attribute, pass the corresponding
argument. To remove a default value or/and an annotation from a
:class:`!Parameter`, pa... | .. method:: Parameter.replace(*[, name][, kind][, default][, annotation])
Create a new :class:`Parameter` instance based on the instance replaced was invoked
on. To override a :class:`!Parameter` attribute, pass the corresponding
argument. To remove a default value or/and an annotation from a
:class:`!Parameter`, pa... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
67f86193-e352-4742-9488-a931d0113394 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,585 | supabase-export-v2 | 86e512b061df4b2e | .. function:: getfile(object)
Return the name of the (text or binary) file in which an object was defined. This will fail with a :exc:`TypeError` if the object is a built-in module,
class, or function. | trusted_official_docs | CPython Docs | .. function:: getfile(object)
Return the name of the (text or binary) file in which an object was defined. This will fail with a :exc:`TypeError` if the object is a built-in module,
class, or function. | .. function:: getfile(object)
Return the name of the (text or binary) file in which an object was defined. This will fail with a :exc:`TypeError` if the object is a built-in module,
class, or function. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
6813db97-9ef8-4322-997d-b26c9541af79 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,733 | supabase-export-v2 | 8b81e29d4c5f7a01 | function is now based on :func:`signature`, but still ignores ``__wrapped__`` attributes and includes the already bound first parameter in the signature output for bound methods.
.. versionchanged:: 3.6
This method was previously documented as deprecated in favour of
:func:`signature` in Python 3.5, but that decision... | trusted_official_docs | CPython Docs | function is now based on :func:`signature`, but still ignores ``__wrapped__`` attributes and includes the already bound first parameter in the signature output for bound methods.
.. versionchanged:: 3.6
This method was previously documented as deprecated in favour of
:func:`signature` in Python 3.5, but that decision... | function is now based on :func:`signature`, but still ignores ``__wrapped__`` attributes and includes the already bound first parameter in the signature output for bound methods.
.. versionchanged:: 3.6
This method was previously documented as deprecated in favour of
:func:`signature` in Python 3.5, but that decision... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
694b50e5-f82d-4ddc-bce7-751d10ea65a5 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,897 | supabase-export-v2 | 637e964dc11d2ac8 | .. versionadded:: 3.14
.. note::
The flags are specific to CPython, and may not be defined in other
Python implementations. Furthermore, the flags are an implementation
detail, and can be removed or deprecated in future Python releases. It's recommended to use public APIs from the :mod:`!inspect` module
for any int... | trusted_official_docs | CPython Docs | .. versionadded:: 3.14
.. note::
The flags are specific to CPython, and may not be defined in other
Python implementations. Furthermore, the flags are an implementation
detail, and can be removed or deprecated in future Python releases. It's recommended to use public APIs from the :mod:`!inspect` module
for any int... | .. versionadded:: 3.14
.. note::
The flags are specific to CPython, and may not be defined in other
Python implementations. Furthermore, the flags are an implementation
detail, and can be removed or deprecated in future Python releases. It's recommended to use public APIs from the :mod:`!inspect` module
for any int... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
6a7eadce-425e-4497-9bb4-f8dbfef9a9a4 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,560 | supabase-export-v2 | e719ab6b6cb1ca38 | not a :meth:`~object.__set__` method or a :meth:`~object.__delete__` method. Beyond that, the set of attributes varies. A :attr:`~definition.__name__` attribute is usually sensible, and :attr:`~definition.__doc__` often is.
Methods implemented via descriptors that also pass one of the other tests
return ``False`` from... | trusted_official_docs | CPython Docs | not a :meth:`~object.__set__` method or a :meth:`~object.__delete__` method. Beyond that, the set of attributes varies. A :attr:`~definition.__name__` attribute is usually sensible, and :attr:`~definition.__doc__` often is.
Methods implemented via descriptors that also pass one of the other tests
return ``False`` from... | not a :meth:`~object.__set__` method or a :meth:`~object.__delete__` method. Beyond that, the set of attributes varies. A :attr:`~definition.__name__` attribute is usually sensible, and :attr:`~definition.__doc__` often is.
Methods implemented via descriptors that also pass one of the other tests
return ``False`` from... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
6e3eb950-aebe-4f35-b474-fa4189d350ba | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,639 | supabase-export-v2 | 7a107cba81deebfb | allows the omission of some required arguments (mimics :func:`functools.partial` behavior.) Returns :class:`BoundArguments`, or raises a :exc:`TypeError` if the passed arguments do not match the signature.
.. method:: Signature.replace(*[, parameters][, return_annotation]) | trusted_official_docs | CPython Docs | allows the omission of some required arguments (mimics :func:`functools.partial` behavior.) Returns :class:`BoundArguments`, or raises a :exc:`TypeError` if the passed arguments do not match the signature.
.. method:: Signature.replace(*[, parameters][, return_annotation]) | allows the omission of some required arguments (mimics :func:`functools.partial` behavior.) Returns :class:`BoundArguments`, or raises a :exc:`TypeError` if the passed arguments do not match the signature.
.. method:: Signature.replace(*[, parameters][, return_annotation]) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
6f2b696a-8416-42c5-982c-dd68fefb8baf | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,740 | supabase-export-v2 | 63aa3190e2c3448d | the four values returned by :func:`getargvalues`. The format\* arguments are the corresponding optional formatting functions that are called to turn names and values into strings.
.. note::
This function was inadvertently marked as deprecated in Python 3.5. | trusted_official_docs | CPython Docs | the four values returned by :func:`getargvalues`. The format\* arguments are the corresponding optional formatting functions that are called to turn names and values into strings.
.. note::
This function was inadvertently marked as deprecated in Python 3.5. | the four values returned by :func:`getargvalues`. The format\* arguments are the corresponding optional formatting functions that are called to turn names and values into strings.
.. note::
This function was inadvertently marked as deprecated in Python 3.5. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
74bed41c-94a5-4be9-b5ca-fc8c731c48fe | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,537 | supabase-export-v2 | ac23a18adb6de05b | .. versionchanged:: 3.8 Functions wrapped in :func:`functools.partial` now return ``True`` if the wrapped function is an :term:`asynchronous generator` function.
.. versionchanged:: 3.13
Functions wrapped in :func:`functools.partialmethod` now return ``True``
if the wrapped function is a :term:`asynchronous generator... | trusted_official_docs | CPython Docs | .. versionchanged:: 3.8 Functions wrapped in :func:`functools.partial` now return ``True`` if the wrapped function is an :term:`asynchronous generator` function.
.. versionchanged:: 3.13
Functions wrapped in :func:`functools.partialmethod` now return ``True``
if the wrapped function is a :term:`asynchronous generator... | .. versionchanged:: 3.8 Functions wrapped in :func:`functools.partial` now return ``True`` if the wrapped function is an :term:`asynchronous generator` function.
.. versionchanged:: 3.13
Functions wrapped in :func:`functools.partialmethod` now return ``True``
if the wrapped function is a :term:`asynchronous generator... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
79973613-7fc6-4634-8c36-4a049dff81ee | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,450 | supabase-export-v2 | 8d61d64e3b76226e | code of a method, extract and format the argument list for a function, or get all the information you need to display a detailed traceback.
There are four main kinds of services provided by this module: type checking,
getting source code, inspecting classes and functions, and examining the
interpreter stack. | trusted_official_docs | CPython Docs | code of a method, extract and format the argument list for a function, or get all the information you need to display a detailed traceback.
There are four main kinds of services provided by this module: type checking,
getting source code, inspecting classes and functions, and examining the
interpreter stack. | code of a method, extract and format the argument list for a function, or get all the information you need to display a detailed traceback.
There are four main kinds of services provided by this module: type checking,
getting source code, inspecting classes and functions, and examining the
interpreter stack. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7c246b6d-31f9-492e-b99d-1986780d2b9f | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,781 | supabase-export-v2 | 164f1a8ed0188194 | .. attribute:: positions
A :class:`dis.Positions` object containing the start line number, end line
number, start column offset, and end column offset associated with the
instruction being executed by the frame this record corresponds to. | trusted_official_docs | CPython Docs | .. attribute:: positions
A :class:`dis.Positions` object containing the start line number, end line
number, start column offset, and end column offset associated with the
instruction being executed by the frame this record corresponds to. | .. attribute:: positions
A :class:`dis.Positions` object containing the start line number, end line
number, start column offset, and end column offset associated with the
instruction being executed by the frame this record corresponds to. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7e995379-634e-44dd-87c0-86c5e373348a | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,854 | supabase-export-v2 | 078f895b66700ba5 | Possible states are:
* AGEN_CREATED: Waiting to start execution. * AGEN_RUNNING: Currently being executed by the interpreter. * AGEN_SUSPENDED: Currently suspended at a yield expression. * AGEN_CLOSED: Execution has completed. | trusted_official_docs | CPython Docs | Possible states are:
* AGEN_CREATED: Waiting to start execution. * AGEN_RUNNING: Currently being executed by the interpreter. * AGEN_SUSPENDED: Currently suspended at a yield expression. * AGEN_CLOSED: Execution has completed. | Possible states are:
* AGEN_CREATED: Waiting to start execution. * AGEN_RUNNING: Currently being executed by the interpreter. * AGEN_SUSPENDED: Currently suspended at a yield expression. * AGEN_CLOSED: Execution has completed. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
82a0a8cd-7376-4aed-bcdc-e4c5880ad88e | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,624 | supabase-export-v2 | 92fac717d15bd867 | call signature of a function and its return annotation. For each parameter accepted by the function it stores a :class:`Parameter` object in its :attr:`parameters` collection.
The optional *parameters* argument is a sequence of :class:`Parameter`
objects, which is validated to check that there are no parameters with
... | trusted_official_docs | CPython Docs | call signature of a function and its return annotation. For each parameter accepted by the function it stores a :class:`Parameter` object in its :attr:`parameters` collection.
The optional *parameters* argument is a sequence of :class:`Parameter`
objects, which is validated to check that there are no parameters with
... | call signature of a function and its return annotation. For each parameter accepted by the function it stores a :class:`Parameter` object in its :attr:`parameters` collection.
The optional *parameters* argument is a sequence of :class:`Parameter`
objects, which is validated to check that there are no parameters with
... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
838f5a10-976a-45f4-b3e6-801d2484f7bb | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,681 | supabase-export-v2 | dfebfe965b18beb5 | >>> def foo(a, b, *, c, d=10): ... pass
>>> sig = signature(foo)
>>> for param in sig.parameters.values():
... if (param.kind == param.KEYWORD_ONLY and
... param.default is param.empty):
... print('Parameter:', param)
Parameter: c | trusted_official_docs | CPython Docs | >>> def foo(a, b, *, c, d=10): ... pass
>>> sig = signature(foo)
>>> for param in sig.parameters.values():
... if (param.kind == param.KEYWORD_ONLY and
... param.default is param.empty):
... print('Parameter:', param)
Parameter: c | >>> def foo(a, b, *, c, d=10): ... pass
>>> sig = signature(foo)
>>> for param in sig.parameters.values():
... if (param.kind == param.KEYWORD_ONLY and
... param.default is param.empty):
... print('Parameter:', param)
Parameter: c | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
840be601-ea0a-4592-b541-d2ad02cf3b42 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,820 | supabase-export-v2 | 6871dc9368ac4739 | objects for the caller's stack. The first entry in the returned list represents the caller; the last entry represents the outermost call on the stack.
.. versionchanged:: 3.5
A list of :term:`named tuples <named tuple>`
``FrameInfo(frame, filename, lineno, function, code_context, index)``
is returned. | trusted_official_docs | CPython Docs | objects for the caller's stack. The first entry in the returned list represents the caller; the last entry represents the outermost call on the stack.
.. versionchanged:: 3.5
A list of :term:`named tuples <named tuple>`
``FrameInfo(frame, filename, lineno, function, code_context, index)``
is returned. | objects for the caller's stack. The first entry in the returned list represents the caller; the last entry represents the outermost call on the stack.
.. versionchanged:: 3.5
A list of :term:`named tuples <named tuple>`
``FrameInfo(frame, filename, lineno, function, code_context, index)``
is returned. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
868cd58d-24f5-4c36-b6df-4c57444b854e | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,736 | supabase-export-v2 | 7f16e9bcdb4414b0 | .. function:: getargvalues(frame)
Get information about arguments passed into a particular frame. A
:term:`named tuple` ``ArgInfo(args, varargs, keywords, locals)`` is
returned. *args* is a list of the argument names. *varargs* and *keywords*
are the names of the ``*`` and ``**`` arguments or ``None``. *locals* is t... | trusted_official_docs | CPython Docs | .. function:: getargvalues(frame)
Get information about arguments passed into a particular frame. A
:term:`named tuple` ``ArgInfo(args, varargs, keywords, locals)`` is
returned. *args* is a list of the argument names. *varargs* and *keywords*
are the names of the ``*`` and ``**`` arguments or ``None``. *locals* is t... | .. function:: getargvalues(frame)
Get information about arguments passed into a particular frame. A
:term:`named tuple` ``ArgInfo(args, varargs, keywords, locals)`` is
returned. *args* is a list of the argument names. *varargs* and *keywords*
are the names of the ``*`` and ``**`` arguments or ``None``. *locals* is t... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
88c8338c-27f0-4c5b-9922-e8340a6e59d3 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,817 | supabase-export-v2 | c82759f0230bd550 | .. impl-detail::
This function relies on Python stack frame support in the interpreter,
which isn't guaranteed to exist in all implementations of Python. If
running in an implementation without Python stack frame support this
function returns ``None``. | trusted_official_docs | CPython Docs | .. impl-detail::
This function relies on Python stack frame support in the interpreter,
which isn't guaranteed to exist in all implementations of Python. If
running in an implementation without Python stack frame support this
function returns ``None``. | .. impl-detail::
This function relies on Python stack frame support in the interpreter,
which isn't guaranteed to exist in all implementations of Python. If
running in an implementation without Python stack frame support this
function returns ``None``. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
89321b08-1e4f-489d-8e79-37f14d2f4340 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,849 | supabase-export-v2 | ce994e700c816725 | Possible states are:
* CORO_CREATED: Waiting to start execution. * CORO_RUNNING: Currently being executed by the interpreter. * CORO_SUSPENDED: Currently suspended at an await expression. * CORO_CLOSED: Execution has completed. | trusted_official_docs | CPython Docs | Possible states are:
* CORO_CREATED: Waiting to start execution. * CORO_RUNNING: Currently being executed by the interpreter. * CORO_SUSPENDED: Currently suspended at an await expression. * CORO_CLOSED: Execution has completed. | Possible states are:
* CORO_CREATED: Waiting to start execution. * CORO_RUNNING: Currently being executed by the interpreter. * CORO_SUSPENDED: Currently suspended at an await expression. * CORO_CLOSED: Execution has completed. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
893c8501-2620-4eff-b4d7-f8afcaf6a12f | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,885 | supabase-export-v2 | d985e6560a7f6d4f | .. data:: CO_COROUTINE
The flag is set when the code object is a coroutine function. When the code object is executed it returns a coroutine object. See :pep:`492` for more details. | trusted_official_docs | CPython Docs | .. data:: CO_COROUTINE
The flag is set when the code object is a coroutine function. When the code object is executed it returns a coroutine object. See :pep:`492` for more details. | .. data:: CO_COROUTINE
The flag is set when the code object is a coroutine function. When the code object is executed it returns a coroutine object. See :pep:`492` for more details. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8971232b-993e-498b-ab7e-74d009387bfe | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,827 | supabase-export-v2 | 92c8080e51ce59bc | Fetching attributes statically ------------------------------
Both :func:`getattr` and :func:`hasattr` can trigger code execution when
fetching or checking for the existence of attributes. Descriptors, like
properties, will be invoked and :meth:`~object.__getattr__` and
:meth:`~object.__getattribute__`
may be called. | trusted_official_docs | CPython Docs | Fetching attributes statically ------------------------------
Both :func:`getattr` and :func:`hasattr` can trigger code execution when
fetching or checking for the existence of attributes. Descriptors, like
properties, will be invoked and :meth:`~object.__getattr__` and
:meth:`~object.__getattribute__`
may be called. | Fetching attributes statically ------------------------------
Both :func:`getattr` and :func:`hasattr` can trigger code execution when
fetching or checking for the existence of attributes. Descriptors, like
properties, will be invoked and :meth:`~object.__getattr__` and
:meth:`~object.__getattribute__`
may be called. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8cd8dbe3-4dac-4f52-8263-9c1935d36bd5 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,559 | supabase-export-v2 | c276fc9eed22e84c | Return ``True`` if the object is a method descriptor, but not if :func:`ismethod`, :func:`isclass`, :func:`isfunction` or :func:`isbuiltin` are true.
This, for example, is true of ``int.__add__``. An object passing this test
has a :meth:`~object.__get__` method, but not a :meth:`~object.__set__`
method or a :meth:`~o... | trusted_official_docs | CPython Docs | Return ``True`` if the object is a method descriptor, but not if :func:`ismethod`, :func:`isclass`, :func:`isfunction` or :func:`isbuiltin` are true.
This, for example, is true of ``int.__add__``. An object passing this test
has a :meth:`~object.__get__` method, but not a :meth:`~object.__set__`
method or a :meth:`~o... | Return ``True`` if the object is a method descriptor, but not if :func:`ismethod`, :func:`isclass`, :func:`isfunction` or :func:`isbuiltin` are true.
This, for example, is true of ``int.__add__``. An object passing this test
has a :meth:`~object.__get__` method, but not a :meth:`~object.__set__`
method or a :meth:`~o... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9041849e-d311-43f7-a4da-0da261ce1ea3 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,455 | supabase-export-v2 | 2dc00af23b64cfd1 | .. this function name is too big to fit in the ascii-art table below .. |coroutine-origin-link| replace:: :func:`sys.set_coroutine_origin_tracking_depth`
+-----------------+-------------------+---------------------------+
| Type | Attribute | Description |
+=================+===================+========================... | trusted_official_docs | CPython Docs | .. this function name is too big to fit in the ascii-art table below .. |coroutine-origin-link| replace:: :func:`sys.set_coroutine_origin_tracking_depth`
+-----------------+-------------------+---------------------------+
| Type | Attribute | Description |
+=================+===================+========================... | .. this function name is too big to fit in the ascii-art table below .. |coroutine-origin-link| replace:: :func:`sys.set_coroutine_origin_tracking_depth`
+-----------------+-------------------+---------------------------+
| Type | Attribute | Description |
+=================+===================+========================... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9227c757-6829-4ead-9fd4-57618c9ab39e | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,677 | supabase-export-v2 | ad419f81f403bd57 | | | | bound to any other parameter. This | | | corresponds to a ``*args`` parameter in a | | | Python function definition.
|
+------------------------+----------------------------------------------+
| *KEYWORD_ONLY* | Value must be supplied as a keyword argument.|
| | Keyword only parameters are those which |
| | a... | trusted_official_docs | CPython Docs | | | | bound to any other parameter. This | | | corresponds to a ``*args`` parameter in a | | | Python function definition.
|
+------------------------+----------------------------------------------+
| *KEYWORD_ONLY* | Value must be supplied as a keyword argument.|
| | Keyword only parameters are those which |
| | a... | | | | bound to any other parameter. This | | | corresponds to a ``*args`` parameter in a | | | Python function definition.
|
+------------------------+----------------------------------------------+
| *KEYWORD_ONLY* | Value must be supplied as a keyword argument.|
| | Keyword only parameters are those which |
| | a... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
92b22dde-12dd-4b9f-b9af-23240a118f35 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,519 | supabase-export-v2 | 33366f1b07916e21 | This may be of use for sync functions that return a :term:`coroutine`, if the function is passed to an API that requires :func:`iscoroutinefunction`.
When possible, using an :keyword:`async def` function is preferred. Also
acceptable is calling the function and testing the return with
:func:`iscoroutine`. | trusted_official_docs | CPython Docs | This may be of use for sync functions that return a :term:`coroutine`, if the function is passed to an API that requires :func:`iscoroutinefunction`.
When possible, using an :keyword:`async def` function is preferred. Also
acceptable is calling the function and testing the return with
:func:`iscoroutine`. | This may be of use for sync functions that return a :term:`coroutine`, if the function is passed to an API that requires :func:`iscoroutinefunction`.
When possible, using an :keyword:`async def` function is preferred. Also
acceptable is calling the function and testing the return with
:func:`iscoroutine`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
939bfb97-ec7c-42de-95aa-02969eada166 | CPython Docs | file://datasets/cpython/Doc/library/inspect.rst | unknown | f4eb524f-8f5a-453b-8443-c73e66396e18 | 7,613 | supabase-export-v2 | 859f9b75d30e5ec0 | can be passed to the *annotation_format* parameter to control the format of the returned annotations. For example, use ``annotation_format=annotationlib.Format.STRING`` to return annotations in string format.
Raises :exc:`ValueError` if no signature can be provided, and
:exc:`TypeError` if that type of object is not s... | trusted_official_docs | CPython Docs | can be passed to the *annotation_format* parameter to control the format of the returned annotations. For example, use ``annotation_format=annotationlib.Format.STRING`` to return annotations in string format.
Raises :exc:`ValueError` if no signature can be provided, and
:exc:`TypeError` if that type of object is not s... | can be passed to the *annotation_format* parameter to control the format of the returned annotations. For example, use ``annotation_format=annotationlib.Format.STRING`` to return annotations in string format.
Raises :exc:`ValueError` if no signature can be provided, and
:exc:`TypeError` if that type of object is not s... | 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.