(self, key)
return self._options[o.name]
Get the value of a state option.

        :param str key: Name of the state option.
        :return:        Value of the state option.
Get the value of a state option.
Get the value of a state option .
def __getitem__(self, key):
        """
        Get the value of a state option.

        :param str key: Name of the state option.
        :return:        Value of the state option.
        """

        o = self._get_option_desc(key)

        if o.name not in self._options:
            # Special handling for Boolean switches
            if o.one_type() is bool:
                return o.default

            # Special handling for options with default values
            if o.has_default_value:
                return o.default

        return self._options[o.name]
def __getitem__ ( self , key ) : o = self . _get_option_desc ( key ) if o . name not in self . _options : # Special handling for Boolean switches if o . one_type ( ) is bool : return o . default # Special handling for options with default values if o . has_default_value : return o . default return self . _options [ o . name ]