mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
gh-122058: Lib/inspect: Update docstrings for isfunction, isgenerator, isframe, iscode. (#122059)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
0b433aa9df
commit
8ce70d6c69
3 changed files with 50 additions and 10 deletions
|
|
@ -153,6 +153,19 @@ attributes (see :ref:`import-mod-attrs` for module attributes):
|
|||
| | f_trace | tracing function for this |
|
||||
| | | frame, or ``None`` |
|
||||
+-----------------+-------------------+---------------------------+
|
||||
| | f_trace_lines | indicate whether a |
|
||||
| | | tracing event is |
|
||||
| | | triggered for each source |
|
||||
| | | source line |
|
||||
+-----------------+-------------------+---------------------------+
|
||||
| | f_trace_opcodes | indicate whether |
|
||||
| | | per-opcode events are |
|
||||
| | | requested |
|
||||
+-----------------+-------------------+---------------------------+
|
||||
| | clear() | used to clear all |
|
||||
| | | references to local |
|
||||
| | | variables |
|
||||
+-----------------+-------------------+---------------------------+
|
||||
| code | co_argcount | number of arguments (not |
|
||||
| | | including keyword only |
|
||||
| | | arguments, \* or \*\* |
|
||||
|
|
@ -214,6 +227,18 @@ attributes (see :ref:`import-mod-attrs` for module attributes):
|
|||
| | | arguments and local |
|
||||
| | | variables |
|
||||
+-----------------+-------------------+---------------------------+
|
||||
| | co_lines() | returns an iterator that |
|
||||
| | | yields successive |
|
||||
| | | bytecode ranges |
|
||||
+-----------------+-------------------+---------------------------+
|
||||
| | co_positions() | returns an iterator of |
|
||||
| | | source code positions for |
|
||||
| | | each bytecode instruction |
|
||||
+-----------------+-------------------+---------------------------+
|
||||
| | replace() | returns a copy of the |
|
||||
| | | code object with new |
|
||||
| | | values |
|
||||
+-----------------+-------------------+---------------------------+
|
||||
| generator | __name__ | name |
|
||||
+-----------------+-------------------+---------------------------+
|
||||
| | __qualname__ | qualified name |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue