Evaluate an expression within a context. — with.python.builtin.object (original) (raw)

Source: R/python.R

with.python.builtin.object.Rd

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

# 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