src/pylib/Lib/inspect

Source   Edit  

Iterators

iterator getmembers[T](obj: T): GetMemberType
Source   Edit  
iterator getmembers[T](obj: T; predict: GetMembersPredict): GetMemberType
Source   Edit  

Macros

macro getsourcelines(obj: typed): (PyList[string], int)

get source code of the object

the first element is the source code the second element is the line number of the first line of the source code

Source   Edit  

Templates

template cleandoc(obj: PyStr): PyStr
Source   Edit  
template getdoc(obj: untyped): PyStr
Source   Edit  
template getfile(obj: untyped): PyStr
Source   Edit  
template getmembers(obj): PyList
Source   Edit  
template getmembers(obj; predict: GetMembersPredict): PyList
Source   Edit  
template getmembers_static(obj): untyped
Admonition: since Python 3.11
Source   Edit  
template getmembers_static(obj; predict: GetMembersPredict): untyped
Admonition: since Python 3.11
Source   Edit  
template getmodulename(obj: PyStr): PyStr
Source   Edit  
template getsource(obj: untyped): PyStr
Source   Edit  
template getsourcefile(obj: untyped): PyStr
Source   Edit  
template isawaitable(obj): bool
Admonition: since Python 3.5
Source   Edit  
template iscoroutinefunction(obj): bool
Admonition: since Python 3.5
Source   Edit  
template markcoroutinefunction(obj): untyped
Admonition: since Python 3.12
Source   Edit