Retrieve an item from a Python object, similar to how
x[name]
might be used in Python code to access an
item indexed by key
on an object x
. The object's
__getitem__
method will be called.
py_get_item(x, key, silent = FALSE)
A Python object.
The key used for item lookup.
Boolean; when TRUE
, attempts to access
missing items will return NULL
rather than
throw an error.
Other item-related APIs: py_del_item
,
py_set_item