% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/python.R
\name{with.python.builtin.object}
\alias{with.python.builtin.object}
\title{Evaluate an expression within a context.}
\usage{
\method{with}{python.builtin.object}(data, expr, as = NULL, ...)
}
\arguments{
\item{data}{Context to enter and exit}

\item{expr}{Expression to evaluate within the context}

\item{as}{Name of variable to assign context to for the duration of the
expression's evaluation (optional).}

\item{...}{Unused}
}
\description{
The \code{with} method for objects of type \code{python.builtin.object}
implements the context manager protocol used by the Python \code{with}
statement. The passed object must implement the
\href{https://docs.python.org/3/reference/datamodel.html#context-managers}{context
manager} (\code{__enter__} and \code{__exit__} methods.
}
