Part of GTG.core.tagstore View In Hierarchy
Task
s.
I mean, surely you must know what a tag is by now. Think Gmail, del.icio.us, Flickr et al.
A tag is defined by its name, which in most cases is
@something
. A tag can also have multiple arbitrary attributes.
The only attribute enforced for tags is name
, which always
matches Tag.get_name()
.
Method | __init__ | Construct a tag. |
Method | get_name | Return the name of the tag. |
Method | set_attribute | Set an arbitrary attribute. |
Method | get_attribute | Get the attribute att_name . |
Method | get_all_attributes | Return a list of all attribute names. |
Method | __str__ | Undocumented |
Parameters | name | The name of the tag. Should be a string, generally a short one. |
save_cllbk | A nullary callable, called whenever an attribute is set. |
This will call the save_cllbk
callback passed to the
constructor.
Parameters | att_name | The name of the attribute. |
att_value | The value of the attribute. Will be converted to a string. |
att_name
.
Returns None
if there is no attribute matching
att_name
.