Class to deal with one option.
- author: Brigitte Bigi
- organization: Laboratoire Parole et Langage, Aix-en-Provence, France
- contact: contact@sppas.org
- license: GPL, v3
- copyright: Copyright (C) 2011-2019 Brigitte Bigi
In many situations, we have to store an un-typed data and its type separately, plus eventually other information like a description. Such data is called "option".
An option is a set of data with a main value and its type, plus 3 other variables to store any kind of information. By default, the type of an option is "str", the value is an empty string and the name, text and description are all empty strings.
Example
>>> o = sppasBaseOption("integer", "3")
>>> v = o.get_value()
>>> type(v)
>>> <type 'int'>
>>> v = o.get_untypedvalue()
>>> type(v)
>>> <type 'str'>