concepts.dsl.dsl_types.FormatContext#
- class FormatContext[source]#
Bases:
OptionContext
FormatContext is a context manager that controls the format of types and objects.
Methods
Make this option context the current context.
Get the current option context.
get_option
(name)Get the option value of the current context.
set_default_option
(name, value)Set the option value for the current context.
Attributes
If True, the type will be formatted as
Type[typename]
.If True, the object format will include the type.
If True, the function format will be lambda-function styled.
The maximum length of the expression per line.
The separator between the type and the variable name.
- __init__(**init_kwargs)#
- __new__(**kwargs)#
- as_default()#
Make this option context the current context. It will overwrite the current option values.
- classmethod get_default()#
Get the current option context.
- classmethod get_option(name)#
Get the option value of the current context.
- classmethod set_default_option(name, value)#
Set the option value for the current context.
- current_context = <_thread._local object>#
- default_context = <_thread._local object>#