Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

py_is_null_xptr

Check if a Python object is a null externalptr


Description

Check if a Python object is a null externalptr

Usage

py_is_null_xptr(x)

py_validate_xptr(x)

Arguments

x

Python object

Details

When Python objects are serialized within a persisted R environment (e.g. .RData file) they are deserialized into null externalptr objects (since the Python session they were originally connected to no longer exists). This function allows you to safely check whether whether a Python object is a null externalptr.

The py_validate function is a convenience function which calls py_is_null_xptr and throws an error in the case that the xptr is NULL.

Value

Logical indicating whether the object is a null externalptr


reticulate

Interface to 'Python'

v1.20
Apache License 2.0
Authors
Kevin Ushey [aut, cre], JJ Allaire [aut], RStudio [cph, fnd], Yuan Tang [aut, cph] (<https://orcid.org/0000-0001-5243-233X>), Dirk Eddelbuettel [ctb, cph], Bryan Lewis [ctb, cph], Sigrid Keydana [ctb], Ryan Hafen [ctb, cph], Marcus Geelnard [ctb, cph] (TinyThread library, http://tinythreadpp.bitsnbites.eu/)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.