Part of formless.annotate View Source View In Hierarchy
Known subclasses: formless.annotate.Radio
Split Table into Classes Show Methods in One Table
| Line # | Kind | Name | Docs |
|---|---|---|---|
| 280 | Method | __init__ | Create a Choice. |
| 329 | Method | coerce | Coerce a value with the help of an object, which is the object |
Inherited from Typed:
| Line # | Kind | Name | Docs |
|---|---|---|---|
| 137 | Method | getAttribute | Undocumented |
| Line # | Kind | Name | Docs |
|---|---|---|---|
| 280 | Method | __init__ | Create a Choice. |
| 329 | Method | coerce | Coerce a value with the help of an object, which is the object |
| 137 | Method | getAttribute | Undocumented |
| Parameters | choices | an object adaptable to IGettable for an iterator (such as a function which takes (ctx, data) and returns a list, a list itself, a tuple, a generator...) |
| stringify | a pretty-printer. a function which takes an object in the list of choices and returns a label for it. | |
| valueToKey | a function which converts an object in the list of choices to a string that can be sent to a client. | |
| keyToValue | a 1-argument convenience version of keyAndConfigurableToValue | |
| keyAndConfigurableToValue | a 2-argument function which takes a string such as one returned from valueToKey and a configurable, and returns an object such as one from the list of choices. |