library(keras)
set.seed(1234)
%<-active% function(value) {
x message("Evaluating function of active binding")
if(missing(value))
runif(1)
else
message("Received: ", value)
}
x
x <- "foo"
x <- "foo"
x
x rm(x) # cleanup
%<-active%
Make an Active Binding
Description
Make an Active Binding
Usage
%<-active% value sym
Arguments
Arguments | Description |
---|---|
sym | symbol to bind |
value | A function to call when the value of sym is accessed. |
Details
Active bindings defined in a %py_class%
are converted to @property
decorated methods.
Value
value
, invisibly
Examples
See Also
makeActiveBinding()