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

with.python.builtin.object

Evaluate an expression within a context.


Description

The with method for objects of type python.builtin.object implements the context manager protocol used by the Python with statement. The passed object must implement the context manager (__enter__ and __exit__ methods.

Usage

## S3 method for class 'python.builtin.object'
with(data, expr, as = NULL, ...)

Arguments

data

Context to enter and exit

expr

Expression to evaluate within the context

as

Name of variable to assign context to for the duration of the expression's evaluation (optional).

...

Unused


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.