Type: Class
defines an interface and methods for three often-used variables: name, label and doc.Vocabulary: name should be a possibly valid Python identifier. So no spaces, no punctuation characters, may not start with a digit... label can be longer, but only one line. doc can be more than one line
- hasLabel() : returns True if the label has been set.
- getLabel() : always returns a string. If an explicit label was not set, then the name is used.
- __str__() (method)
Refering articles:
- Describable.__str__() (24.09.05) — An unnamed Describable gets its parent's name suffixed with a "+" as default. Describable.__str__() did not yet know about this.
- Working on HtmlDocument (24.09.05) — Working on module html (static html), testcase 42 and Timings. more
- Describable.hasLabel() (code changes 04.03.05) — Since Describable.getLabel() never returns None (but uses the name if a label wasn't set), there is now a method hasLabel() which returns True is a label *really* was set. Form now supports entries without label. more
- about datatypes (code changes 20.01.05) — A datatypes.Type is now a Describable. Replaced Type.child() by Type.__call__(): Instead of writing STRING.child(width=8) you write now STRING(width=8). I should maybe rename datatypes to "fieldtypes".