Learn R Programming

reticulate (version 1.38.0)

py_has_attr: Check if a Python object has an attribute

Description

Check whether a Python object x has an attribute name.

Usage

py_has_attr(x, name)

Value

TRUE if the object has the attribute name, and FALSE otherwise.

Arguments

x

A python object.

name

The attribute to be accessed.