class documentation

class Option:

View In Hierarchy

A descriptor implementing BabelNet configuration options.

Method __init__ init method
Instance Variable default The default value of this Option.
Instance Variable doc Docstring used to document the Option.
Instance Variable interpolate If interpolate is set to an Option having a str value and the current Option has a str value then the result is the concatenated strings. This is useful for joining a base path with a file name.
Instance Variable name Name of the option.
Instance Variable on_change Optional callback function that is triggered when the Option is modified. The parameter of the function is the Config instance where the descriptor is used.
Method __get__ Undocumented
Method __set__ Undocumented
Method __set_name__ Undocumented
Method _callback Trigger any callbacks.
Method _docstring get the docstring
def __init__(self, default, interpolate=None, on_change=None, doc=None):

init method

Parameters
default:AnyThe default value of this Option.
interpolate:Optional["Option"]If interpolate is set to an Option having a str value and the current Option has a str value then the result is the concatenated strings. This is useful for joining a base path with a file name.
on_change:Optional[Callable[["Config"], None]]Optional callback function that is triggered when the Option is modified. The parameter of the function is the Config instance where the descriptor is used.
doc:Optional[str]Docstring used to document the Option.
default: Any =

The default value of this Option.

doc: Optional[str] =

Docstring used to document the Option.

interpolate: Optional["Option"] =

If interpolate is set to an Option having a str value and the current Option has a str value then the result is the concatenated strings. This is useful for joining a base path with a file name.

name =

Name of the option.

on_change: Optional[Callable[["Config"], None]] =

Optional callback function that is triggered when the Option is modified. The parameter of the function is the Config instance where the descriptor is used.

def __get__(self, obj, cls=None):

Undocumented

def __set__(self, obj, value):

Undocumented

def __set_name__(self, owner, name):

Undocumented

def _callback(self, obj):

Trigger any callbacks.

def _docstring(self):

get the docstring

Returns
strUndocumented