Represent one of the possible tags of a label.
A sppasTag is a data content of any type.
By default, the type of the data is "str" and the content is empty, but
internally the sppasTag stores 'None' values because None is 16 bits and
an empty string is 37.
A sppasTag() content can be one of the following types:
- string/unicode - (str)
- integer - (int)
- float - (float)
- boolean - (bool)
- point - (sppasFuzzyPoint)
- rect - (sppasFuzzyRect)
Get access to the content with the get_content() method and to the typed
content with gettypedcontent().
Example
>>> t1 = sppasTag("2") # "2" (str)
>>> t2 = sppasTag(2) # "2" (str)
>>> t3 = sppasTag(2, tag_type="int") # 2 (int)
>>> t4 = sppasTag("2", tag_type="int") # 2 (int)
>>> t5 = sppasTag("2", tag_type="float") # 2. (float)
>>> t6 = sppasTag("true", tag_type="bool") # True (bool)
>>> t7 = sppasTag(0, tag_type="bool") # False (bool)
>>> t8 = sppasTag((27, 32), tag_type="point") # x=27, y=32 (point)
>>> t9 = sppasTag((27, 32, 3), tag_type="point") # x=27, y=32 (point), radius=3
>>> t10 = sppasTag((27, 32, 320, 200), tag_type="rect")