RelayBoolNot

Defined in module: wield.declarative.callbacks.state_booleans.RelayBoolNot

class RelayBoolNot(*args, **kwargs)[source][github]

Bases: RelayBoolBase

Is true iff state_label’s state is the state given

__init__(sub_bool, **kwargs)[source][github]
Parameters:

sub_bool – RelayBool this value takes the negation of

Methods

__init__(sub_bool, **kwargs)

register([key, callback, call_immediate, ...])

Register a function for callback when this bool's state changes.

register_via(reg_call, callback[, key, remove])

Attributes

sub_bool

callbacks_ontoggle

is_set

Returns T/F status of the bool

notted

value

sub_bool[github]
register(key=None, callback=None, call_immediate=False, assumed_value=('<UNIQUE VALUE>', <function unique_generator.<locals>.UNIQUE_CLOSURE>), remove=False)[source][github]

Register a function for callback when this bool’s state changes.

Parameters:
  • callback – function to register

  • call_immediate – call as the function is added

  • remove – (False) set to remove a callback

Raises:

KeyError on missing callback

The function should have the signature

callback(bool_state):
Parameters:

bool_state – state of the RelayBool’s new value

callbacks_ontoggle[github]
property is_set[github]

Returns T/F status of the bool

notted[github]
register_via(reg_call, callback, key=None, remove=False, **kwargs)[github]
property value[github]