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  

Templates

template cleandoc(obj: PyStr): PyStr
Source   Edit  
template getdoc(obj: untyped): OptionalObj[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): OptionalObj[PyStr]
Source   Edit  
template getsource(obj: untyped): PyStr
Source   Edit  
template getsourcefile(obj: untyped): OptionalObj[PyStr]
Source   Edit  
template getsourcelines(obj: typed): (PyList[PyStr], 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  
template isawaitable(obj: typed): bool
Admonition: since Python 3.5
Source   Edit  
template iscoroutinefunction(obj: typed): bool
Admonition: since Python 3.5
Source   Edit  
template markcoroutinefunction[T](obj: T): T
Admonition: since Python 3.12
Source   Edit