Name
isbuiltin,isclass,iscode, isframe, isfunction, ismethod, ismodule, isroutine
Synopsis
isbuiltin(obj)
Each of these functions accepts a
single argument obj and returns
True if obj belongs to
the type indicated in the function name. Accepted objects are,
respectively: built-in (C-coded) functions, class objects, code
objects, frame objects, Python-coded functions (including
lambda expressions), methods, modules, and, for
isroutine, all methods or functions, either
C-coded or Python-coded. These functions are often used as the
filter argument to
getmembers.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access