A type representing a Python callable as a string.
Supported formats include fully-qualified names such as math.sin,
expressions such as lambda x: x * x or str.upper, and multi-line function
definitions such as def foo(x): ... or class definitions like
class Foo(...): .... If the source string contains multiple lines then lines
prior to the last will be evaluated to provide the context in which to
evaluate the expression, for example::
A type representing a Python callable as a string.
Supported formats include fully-qualified names such as
math.sin
, expressions such aslambda x: x * x
orstr.upper
, and multi-line function definitions such asdef foo(x): ...
or class definitions likeclass Foo(...): ...
. If the source string contains multiple lines then lines prior to the last will be evaluated to provide the context in which to evaluate the expression, for example::is a valid chunk of source code.