datar.core.options
module
datar.core.options
Provide options
Functions
add_option
(
x
,default
)
— Add an option</>get_option
(
x
,default
)
(Any) — Get the current value set for optionx
,ordefault
(which defaults toNULL
) if the option is unset. </>options
(
*args
,_return
,**kwargs
)
(Mapping) — Allow the user to set and examine a variety of global options</>options_context
(
**kwargs
)
— A context manager to execute code with temporary options</>
function
datar.core.options.
options
(
*args
, _return=None
, **kwargs
)
Allow the user to set and examine a variety of global options
Parameters
*args
(Union) — Names of options to return_return
(bool, optional) — Whether return the options.IfNone
, turned toTrue
when option names provided inargs
.**kwargs
(Any) — name-value pair to create/set an option
Returns (Mapping)
The options before updating if _return
is True
.
generator
datar.core.options.
options_context
(
**kwargs
)
A context manager to execute code with temporary options
Note that this is not thread-safe.
function
datar.core.options.
get_option
(
x
, default=None
)
→ Any
Get the current value set for option x
,or default
(which defaults to NULL
) if the option is unset.
Parameters
x
(str) — The name of the optiondefault
(Any, optional) — The default value ifx
is unset
function
datar.core.options.
add_option
(
x
, default=None
)
Add an option
Parameters
x
(str) — The name of the optiondefault
(Any, optional) — The default value ifx
is unset