Functions
const_name

Functions

void delattr (handle obj, handle name)
 
void delattr (handle obj, const char *name)
 
object getattr (handle obj, handle name)
 
object getattr (handle obj, const char *name)
 
object getattr (handle obj, handle name, handle default_)
 
object getattr (handle obj, const char *name, handle default_)
 
dict globals ()
 
bool hasattr (handle obj, handle name)
 
bool hasattr (handle obj, const char *name)
 
ssize_t hash (handle obj)
 
template<typename T , detail::enable_if_t< std::is_base_of< object, T >::value, int > = 0>
bool isinstance (handle obj)
 
bool isinstance (handle obj, handle type)
 
iterator iter (handle obj)
 
size_t len (handle h)
 Get the length of a Python object. More...
 
size_t len_hint (handle h)
 
str repr (handle h)
 
void setattr (handle obj, handle name, handle value)
 
void setattr (handle obj, const char *name, handle value)
 

Detailed Description

Unless stated otherwise, the following C++ functions behave the same as their Python counterparts.

Function Documentation

◆ delattr() [1/2]

void delattr ( handle  obj,
handle  name 
)
inline

Definition at line 736 of file pytypes.h.

◆ delattr() [2/2]

void delattr ( handle  obj,
const char *  name 
)
inline

Definition at line 742 of file pytypes.h.

◆ getattr() [1/4]

object getattr ( handle  obj,
handle  name 
)
inline

Definition at line 748 of file pytypes.h.

◆ getattr() [2/4]

object getattr ( handle  obj,
const char *  name 
)
inline

Definition at line 756 of file pytypes.h.

◆ getattr() [3/4]

object getattr ( handle  obj,
handle  name,
handle  default_ 
)
inline

Definition at line 764 of file pytypes.h.

◆ getattr() [4/4]

object getattr ( handle  obj,
const char *  name,
handle  default_ 
)
inline

Definition at line 772 of file pytypes.h.

◆ globals()

dict globals ( )
inline

Return a dictionary representing the global variables in the current execution frame, or __main__.__dict__ if there is no frame (usually when the interpreter is embedded).

Definition at line 1270 of file pybind11.h.

◆ hasattr() [1/2]

bool hasattr ( handle  obj,
handle  name 
)
inline

Definition at line 728 of file pytypes.h.

◆ hasattr() [2/2]

bool hasattr ( handle  obj,
const char *  name 
)
inline

Definition at line 732 of file pytypes.h.

◆ hash()

ssize_t hash ( handle  obj)
inline

Definition at line 792 of file pytypes.h.

◆ isinstance() [1/2]

template<typename T , detail::enable_if_t< std::is_base_of< object, T >::value, int > = 0>
bool isinstance ( handle  obj)

Return true if obj is an instance of T. Type T must be a subclass of object or a class which was exposed to Python as py::class_<T>.

Definition at line 700 of file pytypes.h.

◆ isinstance() [2/2]

bool isinstance ( handle  obj,
handle  type 
)
inline

Return true if obj is an instance of the type.

Definition at line 718 of file pytypes.h.

◆ iter()

iterator iter ( handle  obj)
inline

Definition at line 2273 of file pytypes.h.

◆ len()

size_t len ( handle  h)
inline

Get the length of a Python object.

Definition at line 2244 of file pytypes.h.

◆ len_hint()

size_t len_hint ( handle  h)
inline

Get the length hint of a Python object. Returns 0 when this cannot be determined.

Definition at line 2254 of file pytypes.h.

◆ repr()

str repr ( handle  h)
inline

Definition at line 2265 of file pytypes.h.

◆ setattr() [1/2]

void setattr ( handle  obj,
handle  name,
handle  value 
)
inline

Definition at line 780 of file pytypes.h.

◆ setattr() [2/2]

void setattr ( handle  obj,
const char *  name,
handle  value 
)
inline

Definition at line 786 of file pytypes.h.



gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:40:58